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

1309 Commits

Author SHA1 Message Date
Peter Dimov
534f5af9e6 Fix boost::detail::winapi references 2018-09-27 08:58:47 +03:00
Vicente J. Botet Escriba
aaca72e34b Fix __attribute(()) syntax typo. 2018-09-23 15:53:28 +02:00
Vicente J. Botet Escriba
f4b239bab1 fix <:: 2018-09-15 10:17:54 +02:00
Vicente J. Botet Escriba
bf7e79c709 fix <:: 2018-09-15 10:16:25 +02:00
Vicente J. Botet Escriba
8c1d232b8c try to manage with #11477. 2018-09-15 07:11:37 +02:00
Vicente J. Botet Escriba
92a5bc4300 manage with #232 2018-09-15 07:10:05 +02:00
Vicente J. Botet Escriba
5b209c2e83 try to fix thread safety issues raised on FreeBSD. 2018-09-10 23:52:48 +02:00
huangqinjin
e54f7e3960 fix warning: comparison of unsigned expression < 0 2018-08-31 13:53:54 +08:00
huangqinjin
d1284b02ad fix compilation with BOOST_NO_EXCEPTIONS 2018-08-31 10:54:35 +08:00
Vicente J. Botet Escriba
68eef9240f try to fix it for C++98. 2018-08-07 17:02:04 +02:00
Vicente J. Botet Escriba
743f2a0348 manage #226: 1.68 thread pool join do interruption. 2018-08-07 14:15:18 +02:00
Vicente J. Botet Escriba
d8d549cf3e manage #13561. 2018-08-07 13:54:35 +02: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
079871ffac Merge branch 'develop' of github.com:boostorg/thread into develop 2018-04-13 20:06:50 +02:00
Vicente J. Botet Escriba
4d62627668 Make it possible to compile with BOOST_NO_EXCEPTIONS defined 2018-04-13 20:06:03 +02:00
Gregor Jasny
2ef70e02a5 pthread_condattr_setclock must not be used prior to Android 21
Fixes #215
2018-04-12 08:51:44 +02:00
Andrey Semashev
5c2dd21508 Update GetTickCount64 calling convention macro.
Boost.WinAPI no longer defines WINAPI calling convention macro and instead defines its own equivalent macro BOOST_WINAPI_WINAPI_CC.
2018-03-11 02:13:36 +03:00
Tom Hughes
1874018c12 Add thread safety annotations for lock_guard 2018-03-01 15:57:00 -08:00
Vicente J. Botet Escriba
040481760c avoid defining twice BOOST_THREAD_WIN32. 2018-02-28 22:16:50 +01:00
Tom Hughes
8ce9826d98 Prefix macros with BOOST_THREAD 2018-02-27 16:51:10 -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
e3358e0925 Merge branch 'develop' of github.com:boostorg/thread into develop 2018-02-26 16:23:41 +01:00
Vicente J. Botet Escriba
13a1f3daaa Merge pull request #211 from Lastique/rewrite_gettickcount64
Rewrite GetTickCount64 emulation implementation.
2018-02-26 16:22:54 +01:00
Vicente J. Botet Escriba
0871d0b0a6 Merge branch 'develop' of github.com:boostorg/thread into develop 2018-02-21 02:13:26 +01:00
Andrey Semashev
8633d7532d Rewritten GetTickCount64 emulation implementation.
This is to resolve the possible license violation as the previous
implementation has been taken from StackOverflow and was not licensed
under the Boost Software License. The new implementation was adopted from
Boost.Log:

1cc577cbf5/src/timestamp.cpp (L66-L86)

The legal issue has been raised in:

https://lists.boost.org/Archives/boost/2018/02/241453.php

Fixes https://github.com/boostorg/thread/issues/209.
2018-02-21 00:44:20 +03:00
Vicente J. Botet Escriba
03acfa57a2 Merge branch 'master' into develop 2018-02-20 18:04:56 +01:00
Vicente J. Botet Escriba
9be0996062 merge develop (timespec_clocks). 2018-02-20 17:52:51 +01:00
Austin Beer
71231fb2ae Remove unnecessary inline keyword from templated functions 2018-02-16 11:38:45 -07:00
Vicente J. Botet Escriba
ff5031db9e Merge branch 'develop' into feature/timespec_clocks 2018-02-14 19:05:50 +01:00
Austin Beer
96484ac57f Replace hard-coded poll interval with BOOST_THREAD_POLL_INTERVAL_MILLISECONDS 2018-02-12 16:52:22 -07:00
Austin Beer
3b7ca04408 Improve when and where the inline keyword is used. 2018-02-12 13:54:50 -07:00
Vicente J. Botet Escriba
473648ce6c fix ODR issue when future continuations are enabled. #193 future_then unit test contains two different implementations of do_continuation function. 2018-02-10 14:12:25 +01:00
Vicente J. Botet Escriba
426636b1d0 Merge pull request #204 from shinobu-x/wip-future-0002
Missing destructor
2018-02-03 09:26:55 +01:00
Shinobu Kinjo
cb322cfa86 Missing destructor 2018-02-02 17:38:27 +09:00
Vicente J. Botet Escriba
f855cb31d1 merge from develop with some winapp merge issues. 2018-01-28 14:37:53 +01:00
Shinobu Kinjo
f83e887d53 Not *_FUNTION_* but *_FUNCTION_* 2018-01-26 10:03:16 +09: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
Nikita Kniazev
7ab14ac4a3 future.hpp: Fixed name shadowing 2017-12-24 03:28:43 +03: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
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
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
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