This avoids worst case behavior if e.g. another thread is preempted while owning the resource the spinning thread is waiting for.
This avoids worst case behavior if e.g. another thread is preempted while owning the resource the spinning thread is waiting for.