Boost logo

Boost :

Subject: Re: [boost] boost::thread dependency on boost::chrono (windows implementation)
From: Christian Hägele (haegele_at_[hidden])
Date: 2013-06-28 03:01:27


Am 28.06.2013, 07:42 Uhr, schrieb Vicente J. Botet Escriba
<vicente.botet_at_[hidden]>:

>>
> Yes, I remember this comment.
>> My questions is if functions like boost::thread::timed_join or
>> boost::mutex::timed_wait may have similar problems on hardware where
>> QueryPerformanceCounter gives wrong result. Is there a way (like a
>> preprocessor macro) to have boost::thread use the old implementation
>> independent from boost::chrono?
>>
>>
> Unfortunately I don't know how to implement a real steady_clock on
> windows platform, and I was wondering if it shouldn't be removed.
> Of course if someone knows how to do it, patches are welcome.
>

Yes, a real steady_clock on windows is hard to implement. GetTickCount
works if a resolution of 16ms is okay.
Not even the std::chrono of VC11 works, because it uses the normal
system-clock(for details see
http://connect.microsoft.com/VisualStudio/feedback/details/753063/c-std-chrono-steady-clock-is-not-steady
or
http://connect.microsoft.com/VisualStudio/feedback/details/753115/steady-clock-class-and-clock-function-are-non-conformant-with-c-11-and-c11-standards).

Unfortunately if it is not possible to switch to the old implementation of
boost::thread(which doesn't depend on boost::chrono) we can't update to
boost 1.54. That is a real blocker for us and I don't see a solution right
now.
Do I miss something? Are we the only ones who suffer from this problem on
windows?

Regards,

Christian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk