Marcus Meissner marcus@jet.franken.de writes:
Since critical sections are thought to be 'fast' and 'short time' locking primitives, and Win32 threads should not sleep in a critical section, we can just give up our timeslice and wait for the other thread that has the lock to continue.
Well, there are tons of places where we will sleep inside a critical section, so it could potentially burn a lot of CPU. That doesn't necessarily make it slower, but it would probably impact other applications more. As usual, the only way to tell is to do benchmarks.