From: Russell Hind (rhind_at_[hidden])
Date: 2004-01-29 11:48:51
And the lwm_win32 is just a spinlock. Isn't it something like (haven't
looked at the code in a while)
Martin Taylor wrote:
> 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
> // requirements:
> // * Not a general purpose mutex, use boost::mutex, CRITICAL_SECTION or
> // pthread_mutex instead.
> // The current implementation can use a pthread_mutex, a CRITICAL_SECTION,
> // or a platform-specific spinlock.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk