Boost logo

Boost :

Subject: Re: [boost] boost::thread dependency on boost::chrono (windows implementation)
From: Ben Pope (benpope81_at_[hidden])
Date: 2013-06-27 22:29:17


On 27/06/13 22:42, Christian Hägele wrote:
> Hello,
>
> as boost::thread now depends on boost::chrono I have the following
> questions:
>
> 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
>
> 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?

There's the following, but I'm not sure what the implication of not
using chrono is!

http://www.boost.org/doc/libs/1_53_0/doc/html/thread/build.html#thread.build.configuration.chrono

Ben


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