
27 Oct
2006
27 Oct
'06
1:20 a.m.
Howard Hinnant wrote:
Here is my implementation of Terekhov's *fair* read/write algorithm, with upgradable thrown in. This algorithm is just as you say: The OS alone decides who gets to run next.
http://home.twcny.rr.com/hinnant/cpp_extensions/upgrade_mutex.html
I'm having trouble eliminating the notify_all from the unlock() "fast path". Under Windows, it is ridiculously expensive; all other algorithms run circles around it, even those that had errors in them. :-) Did you have an unconditional notify_all in your "real" unlock?