Opened 9 years ago

Last modified 8 years ago

#9880 closed Bugs

boost::condition_variable.timed_wait() exception if system time < 1970 — at Initial Version

Reported by: anonymous Owned by:
Milestone: Boost 1.57.0 Component: thread
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

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 (0)

Note: See TracTickets for help on using tickets.