This is usually done to avoid blocking the thread before the end of it's time slice if there is a chance the lock would become available.
If instead they implement a pure spin loop with sleep I can see why it does not perform well.
This is usually done to avoid blocking the thread before the end of it's time slice if there is a chance the lock would become available.
If instead they implement a pure spin loop with sleep I can see why it does not perform well.