Rick Parrish wrote:
Try this ... add a call to Sleep(0) just before
attempting to acquire
the lock. That *may* produce better average performance.
You should never use Sleep(0), that's a horrible suggestion.
Use Sleep(1) and/or, SwitchToThread(), and/or YieldProcessor() and /or
__mm_pause ("pause").
Thanks Alex. I'll have to check these out.
Oh, and Timo's suggestion is very retro (but very valid) if you remember
VAX-11 architecture.