From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-09-03 13:10:46
Matt Hurd wrote:
> On 03/09/05, Alexander Terekhov <terekhov_at_[hidden]> wrote:
>> John Maddock wrote:
>>> * No need to do anything different on CE, or use stringstream etc.
>> I think that especially on CE, you'd really want to use a lock (on
>> slow path) and never busy-wait... priority inversions, y'know.
> Doesn't that just move the race to the lock?
> One trick might to create a locked mutex in the once state
> initialization and unlock when initialised. Waiting threads can block
> on the locked mutex.
This just moves the race to the mutex creation.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk