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
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
Vicente J. Botet Escriba
517f1efc56
replace check by unlock_if_locked as some OsX define a check macro.
2017-10-04 23:33:48 +02:00
Austin Beer
82e2c82e95
Renaming timespec to platform
2017-10-02 09:23:54 -06:00
Vicente J. Botet Escriba
178e0661ab
fix bad clock:: use, shoudl be chrono::steady_clock.
2017-10-02 08:59:41 +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
995033cf20
Make sync_timed_queue more general adding a TimePoint parameter and fix the inteface of all the time related functions _for/_until to take generic chrono::timepoints and chrono::durations.
2017-09-30 12:15:06 +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
847dcbf237
Removed unnecessary explicit qualifiers.
2017-09-29 15:28:04 -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
5ffca91e60
* Hopefully fixed the build failure on Mac OS.
...
* Refactored to use timespec as the internal storage with pthread and intmax_t with Windows.
2017-09-29 10:22:01 -06:00
Austin Beer
3c25ad09ce
Attempting to fix build errors on Windows.
2017-09-29 00:34:47 -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
Austin Beer
c2b207faa4
Switching the Windows condition_variable and interruptible_wait functions over to using internal_timespec_clock.
2017-09-28 13:24:21 -06:00
Austin Beer
29c3b48da0
Switching over to using the existing GetTickCount64() code for reporting monotonic time on Windows. This code is less precise than QueryPerformanceCounter(), but it's more reliable on older versions of Windows (e.g. XP and Server 2003).
2017-09-27 15:40:50 -06:00
Austin Beer
13713f3b9c
Added support for getting time on Windows to the timespec classes.
2017-09-27 10:52:53 -06:00
Vicente J. Botet Escriba
46c1ae6f96
Merge branch 'develop' into feature/timespec_clocks
2017-09-26 05:55:40 +02:00
Austin Beer
417a2d8a46
Fixed compile issue on Windows.
2017-09-25 11:15:09 -06:00
Vicente J. Botet Escriba
ce7f2b09cc
try to use again pthread/shared_mutex.hpp on windows. Comment not used functions in timespec.
2017-09-25 12:52:25 +02:00
Vicente J. Botet Escriba
e6226a95ba
try to fix future wait on posix duration.
2017-09-25 08:39:45 +02:00
Vicente J. Botet Escriba
aa221d02b5
try to fix issues on linu-mono mutex operation on system_time.
2017-09-25 00:18:12 +02:00
Vicente J. Botet Escriba
dd1b5282b2
try to fix issues with windows and shared_mutex.
2017-09-24 17:29:27 +02:00
Vicente J. Botet Escriba
45321f0570
try to fix issues with new pthread/shared_mutex.hpp on windows by disabling the use of the pthread version that now depends on timespec.
2017-09-24 16:31:42 +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
bafc9f43a5
try to fix DateTime time related issues on pthread/shared_mutex.hpp.
2017-09-24 08:12:02 +02:00
Vicente J. Botet Escriba
b98d022d40
try to fix DatTime related functions for mutex/recursive_mutex.
2017-09-23 08:42:02 +02:00
Austin Beer
aeb54ddbe5
Finished fixing the condition_variable[_any] timed_wait() functions.
2017-09-22 14:22:06 -06:00
Vicente J. Botet Escriba
4d385bedd3
try to fix condition_variable::timed_wait for pthread.
2017-09-22 04:18:55 +02:00
Vicente J. Botet Escriba
03a2ea4612
Merge pull request #159 from austin-beer/feature/timespec_clocks_pr6
...
Fixed try_join_* and timed_join functions that were failing time jump tests
2017-09-22 00:37:20 +02:00
Austin Beer
c290fc5f98
Deleted an unused function and added some fixme comments.
2017-09-21 12:59:09 -06:00
Austin Beer
23861b9608
Fixed try_lock_*for() and wait_for() functions that were failing time jump tests.
2017-09-21 12:08:20 -06:00
Austin Beer
24fd5953c9
Fixed timed_join on Windows when the system clock jumps.
2017-09-21 11:27:36 -06:00
Austin Beer
8f51d9c4a7
Fixed try_join_* and timed_join functions that were failing time jump tests
2017-09-21 10:56:53 -06:00
Vicente J. Botet Escriba
5dcc5f6d26
Merge branch 'develop' into feature/timespec_clocks
2017-09-21 18:53:52 +02:00
Austin Beer
8207b88e97
Made function static
2017-09-21 10:48:58 -06:00
Austin Beer
de7e354a8e
Improved the timespec implementation
...
* Added a constructor to timespec_duration, real_timespec_timepoint, and mono_timespec_timepoint that takes an intmax_t representing the number of nanoseconds in the timespec.
* Added a getNs() function to timespec_duration, real_timespec_timepoint, and mono_timespec_timepoint that returns an intmax_t representing the number of nanoseconds in the timespec.
* Added a timespec_milliseconds() function that takes an integer representing milliseconds and returns a timespec_duration.
* Removed some unnecessary BOOST_SYMBOL_VISIBLE declarations.
* Removed the unnecessary d100 variable declarations.
2017-09-21 09:28:18 -06:00
Austin Beer
2f1b1c4d44
Missed a file in the previous commit.
2017-09-20 12:49:22 -06:00
Austin Beer
d8f24d9183
Fixed an issue where the results of Chrono arithmetic operations weren't being assigned to a common type that's guaranteed to compile.
2017-09-20 12:49:22 -06:00
Austin Beer
0fa843532e
Eliminated unnecessary convertions to chrono::nanoseconds
2017-09-20 12:49:21 -06:00
Austin Beer
e6f876e830
More Cleanup
...
* Deleted unused sleep_for() overload in pthread/thread_data.hpp.
* Deleted unused and disabled sleep_for() overloads in win32/thread_data.hpp.
2017-09-20 10:10:17 -06:00
Austin Beer
285d35f43f
Cleanup
...
* Deleted a couple of unnecessary calls to internal_clock_t::now() in v2/thread.hpp.
* Deleted the hidden::sleep_until() functions, which are no longer being used.
* Deleted the condition_variable::do_wait_for() function, which is no longer being used.
* Deleted the sleep_mutex and sleep_condition variables in pthread/thread_data.hpp, which are no longer being used.
2017-09-19 16:12:22 -06:00
Vicente J. Botet Escriba
a18dfa1fea
Merge branch 'feature/timespec_clocks' of github.com:boostorg/thread into feature/timespec_clocks
2017-09-19 23:46:45 +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
962ef813b4
Merge branch 'develop' of github.com:boostorg/thread into develop
2017-09-19 23:31:09 +02:00
Vicente J. Botet Escriba
1c51b5d9b8
fix may-alias issue.
2017-09-19 23:30:42 +02:00
Austin Beer
a9706f0745
Fixed sleep(TimeDuration const& rel_time) when internal clock is not monotonic but CLOCK_MONOTONIC is available.
2017-09-19 15:06:06 -06:00
Vicente J. Botet Escriba
8e718893e5
Merge branch 'feature/timespec_clocks' of github.com:boostorg/thread into feature/timespec_clocks
2017-09-19 22:09:38 +02:00
Austin Beer
f1dec7935f
Rearranged a couple of functions to simplify the #if/#else logic.
2017-09-19 13:22:13 -06:00
Vicente J. Botet Escriba
732f8c7458
Merge pull request #152 from shinobu-x/sk_detail_move_fix_001
...
Do not include same headers twice
2017-09-19 20:39:07 +02:00