Boost logo

Boost :

Subject: Re: [boost] boost::thread dependency on boost::chrono (windows implementation)
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-06-28 01:42:00


Le 27/06/13 16:42, Christian Hägele a écrit :
> Hello,
>
> as boost::thread now depends on boost::chrono I have the following
> questions:
Yes, this is dependency that I have not reached to make optional on Windows.
>
> In boost::chrono on windows the the steady_clock is implemented via
> QueryPerformanceCounter. This may lead to wrong results because on
> some systems QueryPerformanceCounter gives different results on
> different processors.
> In our software we encountered theses problems regularly on some
> customers machines and thus stopped using QueryPerformanceCounter
> without additional checking.
> The problem I'm talking about is described as a TODO in
> boost/chrono/system_clocks.hpp
>
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.

Best,
Vicente


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