From: John Maddock (john_at_[hidden])
Date: 2006-09-19 08:02:57
Peter Dimov wrote:
> Anthony Williams wrote:
>> The mutex algorithm is fairly simple, but I guess it's the condition
>> variables that you are thinking of. I believe it to be reliable, but
>> that can only be borne out with experience. Putting it on HEAD would
>> allow more people to try it out, and more people would actually look
>> at the code. If it's broken, I'd like to know.
> Inventing mutex and condition variable algorithms is a slight cause of
> concern, I have to admit. The easiest way to get a free review of the
> algorithms is to post the code on comp.programming.threads and hope
> that someone of the experts there has enough time to look at them.
> CVs in particular have proven to be quite hard to implement
> correctly, and
> Alexander Terekhov's "8a" algorithm has emerged as a de-facto
I think I'd agree with that: the issue is that no amount of experimental
testing will ever be enough. Only a really thorough theoretical analysis
is up to the job, and that's hard :-(
Using a known good algorithm is definitely the way to go here IMO.
Just another 2c worth...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk