Boost logo

Threads-Devel :

From: Anthony Williams (anthony_at_[hidden])
Date: 2006-08-04 18:07:48


> BTW, if the new implementation uses the lighter (CRITICALSECTION or
> similar)
> implementation... Then my point is mute. Although I am curious to see how
> will you achieve timed waits.

The new boost::mutex implementation uses a semaphore to handle contention,
which you can do a timed wait on. Interlocked operations are used in the
first instance, to detect contention, and avoid waiting on the semaphore
unnecessarily. This is essentially how a Critical Section works, but gives
us greater control.

Anthony

-- 
Anthony Williams
Just Software Solutions Ltd
http://www.justsoftwaresolutions.co.uk

Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk