Commit Graph

244 Commits

Author SHA1 Message Date
Austin Beer
c6863c4b27 Improve the sync_timed_queue test so it is less likely to fail in
non-deterministic timing environments
2019-04-02 09:46:52 -06:00
Austin Beer
ff38aad946 Add pull_until() and pull_for() to test for Issue 271 2019-03-30 19:18:30 -06:00
Austin Beer
ea54f2ec4d Add test for Issue 271 2019-03-22 10:46:53 -06:00
Vicente J. Botet Escriba
5d20f5b342 Fix missing includes files and make executors available by default in version 5. 2019-01-20 22:42:12 +01:00
Vicente J. Botet Escriba
15f2d7a21c fix test not returning boost::report_errors(). 2018-09-06 07:16:17 +02:00
Tom Hughes
b45ae62791 Use macro for comparison so times are printed on failure 2018-04-27 12:03:49 -07:00
Tom Hughes
3b52a8950f Subtract measured sleep time instead of constant 250 ms
boost::this_thread::sleep_for is allowed to sleep longer than the
requested sleep time. This seems to happen especially on virtualized
systems, such as CircleCI.
2018-04-27 12:03:49 -07:00
Tom Hughes
2a68582676 Remove racy check
This check may or may not be true depending on how long it takes pt1 to
finish executing. You can verify this by adding a sleep before the check
in which case "is_ready()" is always true.
2018-04-26 07:30:43 -07:00
Tom Hughes
b7ebda0f15 Remove racy check
This check may or may not be true depending on how long it takes p1 to
finish executing. You can verify this by adding a sleep before the check
in which case "is_ready()" is always true.
2018-04-26 07:30:33 -07:00
Vicente J. Botet Escriba
7b2289a1c5
Merge pull request #212 from thughes/feature/add_thread_safety_annotations
Add clang thread-safety annotations to boost::mutex (pthread-only)
2018-04-25 19:13:05 +02:00
Vicente J. Botet Escriba
1f08b38461 Make the timing check configurable. 2018-03-08 20:39:09 +01:00
Vicente J. Botet Escriba
37e5c6513c Make configurable the timing. Set 100ms for MacOs and 75ms for Linux on CircleCI. 2018-03-08 00:28:51 +01:00
Vicente J. Botet Escriba
7585187d1c dump delta timing to see when there is a timing issue. 2018-03-07 23:20:36 +01:00
Tom Hughes
1874018c12 Add thread safety annotations for lock_guard 2018-03-01 15:57:00 -08:00
Tom Hughes
5fa7ae14b9 Add clang thread-safety annotations to boost::mutex (pthread-only) 2018-02-27 09:30:49 -08:00
Vicente J. Botet Escriba
51d3030a1f Add trace. 2018-01-31 00:40:14 +01:00
Vicente J. Botet Escriba
26f1b6d237 dump diff duration on failing test. 2018-01-30 19:10:11 +01:00
Vicente J. Botet Escriba
5ed197748e Move from 50ms to 75 ms as MacOS runs (on virtual machines?) are failing. 2018-01-30 13:21:03 +01:00
Vicente J. Botet Escriba
79a523390f Added a nex duration trace. 2018-01-30 06:27:08 +01:00
Vicente J. Botet Escriba
f01b7b5013 print diff for some timeouts. 2018-01-29 19:44:25 +01:00
Austin Beer
610c3ae071 Fix issues with v2/shared_mutex.hpp
* Fixed try_unlock_shared_and_lock_until/for() and
  try_unlock_shared_and_lock_upgrade_until/for() so that they wait on the
  correct condition variable for the associated predicate.
* Fixed try_unlock_shared_and_lock_until/for() and
  try_unlock_upgrade_and_lock_until/for() so that they take the
  write_entered_ flag before waiting for all shared readers to unlock. This
  prevents new readers from taking a shared lock or new writers from taking
  the exclusive lock while these functions are waiting to take the
  exclusive lock.
* Changed notify_all() calls to occur while the mutex is being held to be
  consistent with the notify_one() calls and the existing
  pthread/shared_mutex.hpp implementation.
* Added BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS ifdefs.
* Added BOOST_ASSERT() statements to verify correct usage and operation.
* Fixed an incorrect test case that the BOOST_ASSERT() statements
  uncovered.
* Added comments to explain certain design decisions.
2017-12-20 12:26:09 -07:00
Austin Beer
a0f216bb2b Update timed tests to use stricter threshold with pthreads 2017-10-26 07:54:37 -06:00
Austin Beer
2272e9e3f5 Updated more tests to pass consistently on Windows. 2017-10-12 10:48:01 -06:00
Austin Beer
d259e0fde4 Increased the time thresholds on a bunch of tests to be more forgiving so they pass consistently on Windows.
Reduced the time thresholds on a bunch of tests that were TOO forgiving.
2017-10-11 21:40:38 -06:00
Austin Beer
c91c9e6d52 Added tests to check for lost notifications. 2017-10-10 12:06:29 -06:00
Vicente J. Botet Escriba
e3f586836a check > 480 instead of > 500. 2017-10-02 19:06:52 +02:00
Vicente J. Botet Escriba
3479524845 trace elapsed time. 2017-10-02 13:18:33 +02:00
Vicente J. Botet Escriba
b94c36f960 move to 650 ms to see if the test pass. 2017-10-02 08:41:39 +02:00
Austin Beer
659d309206 Re-enabled tests on Windows that had been temporarily disabled. 2017-09-29 15:53:21 -06:00
Austin Beer
35d25851ce * Reverted some of my Windows updates to get a condition variable test on Windows to pass again. Further analysis is needed to determine why the updates didn't work.
* Increased the range of one test so it passes on Windows.
2017-09-29 14:52:42 -06:00
Austin Beer
51e6e654e3 Re-disabled the three move_ctor_upgrade_lock tests on Windows that are still failing. 2017-09-29 02:17:58 -06:00
Austin Beer
a2e037bb54 Fixes and Cleanup
- Fixed build failures on Windows. The timespec struct is not supported by older versions of Visual Studio. I changed the internal representation inside of the *_timespec_timepoint classes to a boost::intmax_t representing the number of nanoseconds since the epoch.
- Fixed some functions that wouldn't execute at all if they were provided a negative time duration or an absolute time that was in the past. From what I understand, they should instead execute once and then return immediately.
- Moved pthread/timespec.hpp to detail/timespec.hpp.
- Deleted detail/internal_clock.hpp and moved the seven relevant lines into detail/timespec.hpp. This keeps all of the internal clock declarations in one place.
- Renamed thread_detail::internal_clock_t to detail::internal_chrono_clock to be consistent with and yet clearly differentiated from detail::internal_timespec_clock.
- Removed "using namespace chrono" to eliminate ambiguious namespace resolution when referencing detail::internal_chrono_clock.
- Re-enabled a few tests on Windows that had previously been disabled. I want to see whether or not they still need to be disabled.
2017-09-28 22:27:37 -06:00
Vicente J. Botet Escriba
46c1ae6f96 Merge branch 'develop' into feature/timespec_clocks 2017-09-26 05:55:40 +02:00
Vicente J. Botet Escriba
de4ee72554 disable some failing unique_lock/upgrade_lock tests on windows. 2017-09-24 20:21:43 +02:00
Vicente J. Botet Escriba
ad5ea75ddd disable tsome failing unique_lock/upgrade_lock tests on windows. 2017-09-24 19:38:34 +02:00
Daniela Engert
4e83359537
fix or silence (msvc) compiler warnings about constant conditional expressions, unused parameters, narrowing, unreachable code, use of 'this' in base member initializations, and some other minor stuff
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-09-24 14:02:17 +02:00
Vicente J. Botet Escriba
981e993d40 Adjust time constraint to windows. 2017-09-21 08:02:22 +02:00
Vicente J. Botet Escriba
4329e5be07 Merge pull request #150 from boostorg/feature/promise_deferred
Feature/promise deferred
2017-09-19 23:42:08 +02:00
Vicente J. Botet Escriba
48a2a960da remove some warnings. 2017-09-19 03:20:46 +02:00
Vicente J. Botet Escriba
728c8f9507 woraround for msvc <= 1900 2017-09-19 03:17:14 +02:00
Vicente J. Botet Escriba
d0db967e3b Merge branch 'develop' of github.com:boostorg/thread into develop 2017-09-19 00:13:57 +02:00
Vicente J. Botet Escriba
d40e0faceb Merge branch 'develop' into feature/promise_deferred 2017-09-18 18:42:48 +02:00
Vicente J. Botet Escriba
aa2fea2250 disable dequeue_views/queue_views tests if < _MSC_VER < 1910 2017-09-18 13:11:57 +02:00
Vicente J. Botet Escriba
a759fc693d replace bad character by white space. 2017-09-18 08:22:37 +02:00
Vicente J. Botet Escriba
65989edb97 Added promise deferred functions. 2017-09-18 02:22:49 +02:00
Vicente J. Botet Escriba
1c85a84474 try to silent issues with msvc 12.0 and devector. 2017-09-18 00:15:35 +02:00
Edward Diener
dfb64a5af5 Removed executable attribute. 2017-09-17 08:51:10 -04:00
Vincent Hsu
603689372c Fix sync_bounded_queue<>::size() 2017-05-10 13:12:01 +08:00
Vicente J. Botet Escriba
c251497758 Avoid throwing on destructor: condition_variable. 2017-05-06 12:09:23 +02:00
Vicente J. Botet Escriba
b8db8fef8b Use parent executor (#11716). Add promise::set_executor and packaged_task::set_executor (#11717). Fix some move semantic issues C++03. 2015-10-11 19:56:38 +02:00