3 ms·
If you define spinning to mean the most naive and bad way to repeatedly check a condition, then yes that would be bad, tautologically. Some libraries have used
by jeffbee 3y ago
If you define spinning to mean the most naive and bad way to repeatedly check a condition, then yes that would be bad, tautologically. Some libraries have used the x86 PAUSE instruction or its equivalent. Recent x86 offers UMWAIT which is also applicable. These are both good and efficient ways to briefly wait.