spinlock
A lock that a waiting thread keeps checking in a tight loop until it is free, instead of going to sleep.
A spinlock is a mutual-exclusion lock acquired by an atomic exchange or compare-and-swap of a flag and released by a store; waiters spin, ideally reading the flag until it looks free before retrying the atomic (test-and-test-and-set) and executing pause/yield in the loop.
See also