
"Peter Dimov" <pdimov@mmltd.net> writes:
Peter Dimov wrote:
Howard Hinnant wrote:
So the fast path would check these bits and avoid the notify_all if they weren't set.
Thanks, I'll try this tomorrow. Later today, I mean.
Works splendidly on uniprocessor, but displays the same odd behavior I've been seeing with the other algorithms on my Pentium D (with XP64):
0R+4W+0F: 46 0R+0W+4F: 14 0R+4W+4F: 10 (!)
The Windows scheduler doesn't like us. Or I've made a mistake somewhere. Even if I didn't, it seems to me that the bit doesn't help in the 4W case since there's always a writer waiting, so we hit the notify_all.
Which mutex/condition implementation are you using? RC-1.34/HEAD/1.33.1 or thread_rewrite? You might get different timings with each, as the underlying mechanisms are quite different. Anthony -- Anthony Williams Software Developer Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk