Commit Graph

61 Commits

Author SHA1 Message Date
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
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
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
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
659d309206 Re-enabled tests on Windows that had been temporarily disabled. 2017-09-29 15:53:21 -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
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
Vicente J. Botet Escriba
981e993d40 Adjust time constraint to windows. 2017-09-21 08:02:22 +02:00
Vicente J. Botet Escriba
48a2a960da remove some warnings. 2017-09-19 03:20:46 +02:00
Edward Diener
dfb64a5af5 Removed executable attribute. 2017-09-17 08:51:10 -04:00
Vicente J. Botet Escriba
8c974800f9 try to remove yet more warnings. 2015-06-23 19:05:32 +02:00
Vicente J. Botet Escriba
c6dbb0c9a5 Thread: merge 84540 to fiw #8626; fix show stopper in packaged_task<void()>.
[SVN r84623]
2013-06-03 16:53:59 +00:00
Vicente J. Botet Escriba
677dbe7688 Thread: merge from trunk 1.54. Fix #8027,#8323,#8337.
[SVN r83660]
2013-03-31 10:56:43 +00:00
Vicente J. Botet Escriba
0ba92626f0 Thread; merge 82471
[SVN r82502]
2013-01-15 20:19:33 +00:00
Vicente J. Botet Escriba
ce46c31555 Thread: merge 82459,82457,82456,82455
[SVN r82491]
2013-01-14 17:17:50 +00:00
Vicente J. Botet Escriba
e160cf0254 Thread: merge from trun 1.53: some minor fixes on the regression tests.
[SVN r82437]
2013-01-10 21:38:43 +00:00
Vicente J. Botet Escriba
67da33a182 Thread: merge from trunk latest changes.
[SVN r82356]
2013-01-04 18:40:49 +00:00
Vicente J. Botet Escriba
565a022a5a Merge from trunk 1.53
[SVN r82029]
2012-12-16 19:01:45 +00:00
Vicente J. Botet Escriba
4d5474d600 Thread: merge from trunk 1.53 strict lock tests
[SVN r81814]
2012-12-10 07:37:23 +00:00
Vicente J. Botet Escriba
ad3247dd29 Thread: merge from trunk 1.53
[SVN r81667]
2012-12-02 09:22:33 +00:00
Vicente J. Botet Escriba
7bc8c437ab Thread: merge from trunk: 1.52
[SVN r80450]
2012-09-08 14:59:26 +00:00
Vicente J. Botet Escriba
75aff7f1a6 Thread: Try to fix spourious issue
[SVN r78276]
2012-04-30 16:01:19 +00:00
Vicente J. Botet Escriba
f60e1d1230 Thread: Try to fix some spourious error
[SVN r78197]
2012-04-25 21:55:07 +00:00
Vicente J. Botet Escriba
28899243b1 Thread: symplify additonaly the conditional code + fix some spurious regression errors
[SVN r77933]
2012-04-12 11:12:23 +00:00
Vicente J. Botet Escriba
031186a8e6 Thread: Add some macros to simplify the conditional code in particular the one related to mmove semantics+ fix some minor regression issues
[SVN r77928]
2012-04-11 23:42:26 +00:00
Vicente J. Botet Escriba
f970c9fddc Thread: remove some warnings + rename BOOST_EXPLICIT_MOVE by BOOST_THREAD_MAKE_RV_REF
[SVN r77918]
2012-04-11 17:16:45 +00:00
Vicente J. Botet Escriba
d95081094f Thread: remove some warnings
[SVN r77849]
2012-04-09 15:26:40 +00:00
Vicente J. Botet Escriba
6ed276190d Thread: rename macros and try to fix some failing sun test
[SVN r77789]
2012-04-05 22:39:22 +00:00
Vicente J. Botet Escriba
8d9370b005 Thread: Try to pass these tests on VACPP
[SVN r77766]
2012-04-04 19:56:56 +00:00
Vicente J. Botet Escriba
297da0745f Thread: Try to pass these test on Sun using BOOST_EXPLICIT_MOVE
[SVN r77753]
2012-04-04 15:14:05 +00:00
Vicente J. Botet Escriba
08ed4c4201 Thread: Added shared mutex upwards conversion + configuration macros
[SVN r77704]
2012-04-01 21:52:47 +00:00
Vicente J. Botet Escriba
09d5125278 Thread: Fix typos due to copy/paste
[SVN r77701]
2012-04-01 20:38:31 +00:00
Vicente J. Botet Escriba
60e34cff11 Thread: Make use of the generic shared implementation for the missing features in windows.
[SVN r77668]
2012-03-31 15:38:56 +00:00
Vicente J. Botet Escriba
ff1d051359 Thread: Added reverse_lock
[SVN r77662]
2012-03-31 08:39:21 +00:00
Vicente J. Botet Escriba
85e32534fa Thread: Added shared_lock_guard
[SVN r77661]
2012-03-31 08:06:57 +00:00
Vicente J. Botet Escriba
0f7e069dd9 Thread: Added explicit int conversion from lock should fail
[SVN r77658]
2012-03-31 06:52:55 +00:00
Vicente J. Botet Escriba
bba3be457b Thread: Fix missing include
[SVN r77399]
2012-03-19 06:49:13 +00:00