2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-30 20:32:10 +00:00
Commit Graph

2505 Commits

Author SHA1 Message Date
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
Vicente J. Botet Escriba
57d991c36b Merge pull request #202 from shinobu-x/wip-future-0001
future.hpp: remove some unneeded declarations
2018-01-22 23:37:58 +01:00
Shinobu Kinjo
072bbee63e future.hpp:
1) Removed redundant access specifiers and unused variables in future_deferred_shared_state
2) check lock before unlock
2018-01-23 04:58:13 +09:00
Vicente J. Botet Escriba
a3cc3a016c Merge pull request #200 from kuhlenough/develop
Add CPU count for VxWorks
2018-01-12 20:43:44 +01:00
Brian Kuhl
669f652f4d Add CPU count for VxWorks 2018-01-12 01:08:11 -05:00
Vicente J. Botet Escriba
c61f3a97e2 Merge pull request #198 from Kojoley/fix-future-name-shadowing
future.hpp: Fixed name shadowing
2017-12-30 10:23:45 +01:00
Vicente J. Botet Escriba
349ec68c0f Merge pull request #199 from DanielaE/fix/no-iterator-inheritance
Inheriting std::iterator is deprecated in c++17
2017-12-30 01:48:34 +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
Nikita Kniazev
7ab14ac4a3 future.hpp: Fixed name shadowing 2017-12-24 03:28:43 +03:00
Vicente J. Botet Escriba
0183e3feb8 Merge pull request #196 from austin-beer/feature/timespec_clocks_pr23_win32_time_jump_fixes
Fix final time jump issues
2017-12-21 18:41:01 +01:00
Vicente J. Botet Escriba
a0c23a608a Merge pull request #189 from gureedo/sync_patch
allow sync policy for future then continuation (fix #111)
2017-12-21 18:40:27 +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
b2903a5d14 Fix v2/shared_mutex.hpp time jump issues 2017-12-20 12:14:59 -07:00
Austin Beer
81f3a78b8a Rearrange v2/shared_mutex.hpp so related functions appear together
* Added checks for BOOST_THREAD_USES_CHRONO
* Rearranged the order of the functions in v2/shared_mutex.hpp
* No changes were made to the contents of any functions
2017-12-19 14:14:17 -07:00
Austin Beer
e5224ee27a Fix win32 shared_mutex time jump issues 2017-12-19 09:42:54 -07:00
Austin Beer
d77affc6f5 Fix win32 mutex and recursive_mutex time jump issues
* Also added comments to the win32 mutex implementations to clarify
  how the existing code works
* Also removed a few unnecessary intermediate variables
2017-12-19 09:42:46 -07:00
Vicente J. Botet Escriba
984ec57446 Merge pull request #191 from austin-beer/feature/timespec_clocks_pr22_sync_queue_fixes
Sync queue fixes, take 2
2017-11-09 00:55:46 +01: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
907e827046 Add support for BOOST_THREAD_V2_SHARED_MUTEX
BOOST_THREAD_V2_SHARED_MUTEX allows users to use v2/shared_mutex.hpp
instead of pthread/shared_mutex.hpp or win32/shared_mutex.hpp.
2017-11-07 16:48:59 -07:00
Aleksey Katargin
609d1a7be0 allow sync policy for future then continuation (fix #111) 2017-11-01 11:40:50 +03:00
Vicente J. Botet Escriba
d19a2499cd Merge pull request #188 from austin-beer/feature/timespec_clocks_pr20_cleanup
Cleanup
2017-10-27 08:10:05 +02:00
Vicente J. Botet Escriba
08619ef517 make use of --abbreviate-paths for windows names. 2017-10-27 08:09:04 +02:00
Vicente J. Botet Escriba
5141adee96 make use of --abbreviate-paths for windows names. 2017-10-27 08:06:12 +02: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
2de04292da Rename CD to common_duration to match Boost Chrono
See https://github.com/boostorg/chrono/pull/23
2017-10-26 07:54:04 -06:00
Austin Beer
c50428f612 Use direct initialization instead of assignment 2017-10-26 07:53:49 -06:00
Austin Beer
b4348b3cff Clean up detail/thread.hpp so all of the chrono functions are together 2017-10-26 07:53:37 -06:00
Austin Beer
fea3e33128 Remove empty v2/thread.hpp file 2017-10-26 07:53:24 -06:00
Austin Beer
d60a11a75b Delete unused file: pthread/shared_mutex_assert.hpp 2017-10-26 07:53:15 -06:00
Austin Beer
cfd93c7747 Correct a fix that I previously implemented incorrectly 2017-10-26 07:52:42 -06:00
Vicente J. Botet Escriba
6d8c0676a1 Merge pull request #187 from Lastique/update_winapi
Update Boost.WinAPI usage to the new location and namespace
2017-10-25 19:36:05 +02:00
Andrey Semashev
343230cd78 Updated Boost.WinAPI usage to the new location and namespace. 2017-10-25 01:09:24 +03:00
Vicente J. Botet Escriba
44080a444c update release notes. 2017-10-24 21:02:01 +02:00
Vicente J. Botet Escriba
6d7bc558d0 Implement mono_platform_clock and mono_platform_timepoint fro MacOs. 2017-10-23 22:40:49 +02:00
Vicente J. Botet Escriba
d345533596 move files from boost/detail to boost/thread/detail. 2017-10-19 18:14:37 +02:00
Vicente J. Botet Escriba
007738d22c Merge branch 'feature/timespec_clocks' of github.com:boostorg/thread into feature/timespec_clocks 2017-10-15 18:28:05 +02:00
Vicente J. Botet Escriba
6ddf6a8acf Merge pull request #180 from austin-beer/feature/timespec_clocks_pr19_no_int_sleep_on_win
Add and fix sleep functions
2017-10-15 18:27:19 +02:00
Vicente J. Botet Escriba
f9e97a68bb Merge branch 'feature/timespec_clocks' of github.com:boostorg/thread into feature/timespec_clocks 2017-10-15 10:17:12 +02:00
Vicente J. Botet Escriba
44d410f067 disable C4459 on msvc. 2017-10-15 10:14:39 +02:00
Vicente J. Botet Escriba
48ceff1e65 Merge pull request #179 from austin-beer/feature/timespec_clocks_pr18_use_pred_overloads
Fix shared_mutex and future time jump tests
2017-10-14 19:10:36 +02:00
Vicente J. Botet Escriba
883637e0f4 try to avoid warning c4244 for msvc. 2017-10-14 13:09:17 +02:00
Austin Beer
3c01e39481 Add and fix sleep functions
- Added no_interruption_point::sleep() functions to pthreads to be
  consistent with Windows.
- Fixed an issue where the no_interruption_point::sleep_*() functions
  were still interruptible on Windows.
2017-10-13 11:48:05 -06:00
Austin Beer
eef7293932 Updated pthread/shared_mutex and future to use predicate wait functions.
- This allowed these classes to take advantage of the time jump fixes in condition_variable.
Fixed a minor issue where, if a thread was waiting after calling one of the following functions and it timed out at the same time it was given the lock, it would return false (failure) rather than succeeding.
- mutex::timed_lock()
- mutex::try_lock_for()
- mutex::try_lock_until()
- recursive_mutex::timed_lock()
- recursive_mutex::try_lock_for()
- recursive_mutex::try_lock_until()
- shared_mutex::timed_lock_shared()
- shared_mutex::try_lock_shared_for()
- shared_mutex::try_lock_shared_until()
2017-10-13 11:47:46 -06:00
Austin Beer
b65b2f3fea Reverted future.hpp and pthread/shared_mutex.hpp back to the versions in the develop branch. This discarded all changes made to these two files in the feature/timespec_clocks branch to date. 2017-10-13 11:47:46 -06:00
Vicente J. Botet Escriba
d70e1aad77 Merge pull request #178 from austin-beer/feature/timespec_clocks_pr17
Update tests to consistently pass on Windows (hopefully)
2017-10-13 19:35:52 +02: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
Vicente J. Botet Escriba
ac99313228 Merge pull request #177 from austin-beer/feature/timespec_clocks_pr16
Fixing lost notification bugs, part 1 (again)
2017-10-11 22:08:25 +02:00