2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-24 18:32:32 +00:00

687 Commits

Author SHA1 Message Date
Austin Beer
7de4a7046a Add test code for time jump issue 2018-02-12 13:54:50 -07: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
Vicente J. Botet Escriba
f855cb31d1 merge from develop with some winapp merge issues. 2018-01-28 14:37:53 +01:00
Vicente J. Botet Escriba
99c2dd9cbc fix : terminating with uncaught exception of type boost::unit_test::framework::setup_error. 2018-01-28 11:33:19 +01:00
Daniela Engert
2eb9f1eb86 Inheriting std::iterator is deprecated in c++17
Therefore get rid of that and replace inheritance by lifting std::iterator's members into the derived class.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-12-29 17:30:59 +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
e96516d10d Fix sync queue time jump issues
* Used the predicate version of condition_variable::wait_until() which
  correctly handles time jump events.

* Fixed an issue with sync_timed_queue::pull_until()/pull_for() where
  they could incorrectly return queue_op_status::timeout instead of
  queue_op_status::success.

* Changed sync_timed_queue::wait_pull() to return
  queue_op_status::success instead of queue_op_status::closed when the
  queue has been closed but an item is available and is ready to be
  pulled off the queue.

* Changed sync_priority_queue::pull_until()/pull_for() and
  sync_timed_queue::pull_until()/pull_for() to return
  queue_op_status::closed instead of throwing an exception when the
  queue is closed since they have a queue_op_status return type.
2017-11-07 21:14:35 -07:00
Austin Beer
1e84b978b2 Use CLOCK_MONOTONIC by default
- Eliminated BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC.
- CLOCK_MONOTONIC is now always used whenever it is available.
2017-10-26 08:07:49 -06: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
7069c97a8b Fixing lost notification bugs, part 1
- Updated all of the functions in all of the condition variable classes to ensure that they don't lose notifications
- Re-enabled notification tests
2017-10-11 10:03:04 -06:00
Vicente J. Botet Escriba
3b5d0c8d7f fix meger issues from develop. Disable notification_lost test as need to be fixed for macos. 2017-10-11 09:32:19 +02:00
Austin Beer
c91c9e6d52 Added tests to check for lost notifications. 2017-10-10 12:06:29 -06:00
Peter Dimov
b86f9eda93 Try to disable std_thread_guard and std_scoped_thread tests on g++ 4.8 2017-10-09 01:40:42 +03:00
Alexander Karzhenkov
f67e6d4417 <threadapi> auto-detection has to be performed in Jamroot 2017-10-05 22:41:03 +05: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
Vicente J. Botet Escriba
9f7e37c892 Merge branch 'develop' into feature/timespec_clocks 2017-10-01 13:28:57 +02:00
Vicente J. Botet Escriba
75d5ebbea5 uncomment dependency from test jamfile to threadapi to see if we get a gree CI on windows. 2017-09-30 13:44:28 +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
Vicente J. Botet Escriba
71bc9c855d comment dependencies to threadapi feature on test/Jamfile to show that there is no impact. 2017-09-29 08:43:30 +02: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
e9ce83b399 Merge pull request #160 from karzhenkov/fix-threadapi-detection
Auto-detection of <threadapi> based on <target-os>
2017-09-28 23:50:38 +02:00
Alexander Karzhenkov
9c1c372067 <threadapi> is now optional; detection rules moved to "threadapi.jam" 2017-09-28 01:25:17 +05: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
Alexander Karzhenkov
ab3da91e67 Auto-detection logic for <threadapi> added to "test/Jamfile.v2" 2017-09-23 21:52:48 +05: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
Vicente J. Botet Escriba
c689b6205c Merge pull request #146 from shinobu-x/sk_scheduling_adaptor_fix_001
Inappropriate class name
2017-09-16 14:50:28 +02:00
Shinobu Kinjo
03431ae64f modified: include/boost/thread/executors/scheduling_adaptor.hpp
modified:   test/test_scheduling_adaptor.cpp
2017-09-16 15:41:18 +09:00