Hello,
About the following SpinLock hat i am using inside my SemaMonitor and
SemaCondvar:
http://code.google.com/p/gpdelphiunits/source/browse/trunk/src/SpinLock.pas?r=37
I think it's not so bad and it can give a decent performance even under
high contention cause it uses a backoff mechanism, and even though it spins
on shared variables and not on local variables causing more
cache-coherence traffic, i don't think it will slow substantially and
globally the threads of your computer, hence
i think this TTAS spinlock with an exponential that i am using have a
decent performance inside my SemaCondvar and SemaMonitor even under high
contention, so no need for an MCS queue Lock.
So enjoy my SemaCondvar and my SemaMonitor and my scalable RWLock cause
they are fast.
You can download them from:
http://pages.videotron.com/aminer/
Thank you,
Amine Moulay Ramdane.