Opened 9 years ago
Last modified 8 years ago
#9880 closed Bugs
boost::condition_variable.timed_wait() exception if system time < 1970 — at Version 3
Reported by: | anonymous | Owned by: | viboes |
---|---|---|---|
Milestone: | Boost 1.57.0 | Component: | thread |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | Cc: |
Description (last modified by )
Os: any windows. Set system time < 01.01.1970, for example 01.01.1950.
Any call to boost::condition_variable.timed_wait() with relative(!) time throw exception because boost try get system time in posix format.
How to fix: boost\thread\win32\thread_data.hpp, line 179 (boost 1.55.0). In constructor
timeout(uintmax_t milliseconds_): start(win32::GetTickCount64()), milliseconds(milliseconds_), relative(true), abs_time(boost::get_system_time()) {}
we set "relative(true)" and there for not need to set variable "abs_time". Must be:
timeout(uintmax_t milliseconds_): start(win32::GetTickCount64()), milliseconds(milliseconds_), relative(true) {}
Change History (3)
comment:1 by , 9 years ago
Component: | None → date_time |
---|---|
Owner: | set to |
comment:2 by , 9 years ago
Component: | date_time → thread |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 9 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.