Boost logo

Boost :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2007-10-22 12:45:45


Peter Dimov wrote:
> Johan Nilsson:
>
>> "Peter Dimov" <pdimov_at_[hidden]> skrev i meddelandet
>> news:010601c811a7$df700410$6407a80a_at_pdimov2...
>
>>> bool f( abstime const & dl )
>>> {
>>> return g( dl ) && h( dl );
>>> }
>>>
>>> (guaranteed wait-free rollback on failed h omitted for simplicity
>>> :-) ).
>>>
>>> Even for the simple condvar wait case, you have a preceding mutex
>>> lock which
>>> needs to also respect the deadline.
>>
>> So the decision to use absolute times are due to implementation
>> details? Ok, sounds reasonable.
>
> No. It has nothing to do with implementation details. f is a user
> function, not a Boost.Threads function. The point is that absolute
> timeouts are composable, and relative timeouts are not.

I understand that. What I meant to say was that to be able to support
certain constructs uniformly for multiple platforms, one is forced to use
absolute times (composition being one of these constructs). If something
similar to WaitForMultipleObjects were universally available the absolute
times might not be neccesary, no matter what Butenhof says.

Sorry for being unclear and wasting your time.

(and there was no sarcasm intended in the "sounds reasonable" part above)

/ Johan


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