|
Boost : |
From: Thorsten Froehlich (froetho_at_[hidden])
Date: 2007-11-28 10:47:07
Anthony Williams wrote:
> Thorsten Froehlich <froetho_at_[hidden]> writes:
>
>> Anthony Williams wrote:
>>>> Making this change, the race condition goes away on one more platform using
>>>> in the boost interface. It should also be considered that relative timeouts
>>>> in the boost interface certainly eliminate a problem on a platform with a
>>>> large market share relevant to many boost developers for better or worse ;-)
>>> How does the race condition go away by making everyone use relative timeouts?
>> You no longer internally (invisible to the user of boost::thread) query the
>> absolute time makes it go away for Windows. And setting the clock condition
>> attribute CLOCK_MONOTONIC with POSIX would make it impossible there as far
>> as I can tell, does it not?
>
> I've updated the implementation of boost::condition_variable and
> boost::condition_variable_any to allow for relative timeouts as well as
> absolute timeouts on the predicate version of timed_wait.
>
> On POSIX, the timeouts are always absolute under-the-hood, so a relative
> timeout is converted into an absolute one.
Thank you _very_ much for the time you put into improving the thread
implementation! Looks like there are some very useful thread changes to look
forward to in the next boost release :-)
Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk