From: Martin Taylor (martin.taylor_at_[hidden])
Date: 2004-01-29 10:32:48
On 29 Jan 2004, at 14:28, Alexander Terekhov wrote:
> Howard Hinnant wrote:
>> Alexander, I have no doubt that you will see problems with this
>> implementation, and I appreciate your comments.
> Get rid of yield. With yield you basically have a spinlock, not a
> general purpose mutex. Think of a uniprocessor [under priority
> scheduling rules] with some higher priority thread contending for
> a lock currently owned by some lower priority thread.
I thought that the lightweight_mutex didn't have to be a general
purpose mutex - in fact it explictily says just that in the comments of
// boost::detail::lightweight_mutex meets a subset of the Mutex concept
// * Not a general purpose mutex, use boost::mutex, CRITICAL_SECTION or
// pthread_mutex instead.
// The current implementation can use a pthread_mutex, a
// or a platform-specific spinlock.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk