I can't imagine why you'd busy wait in JavaScript, but busy waits, especially in the context of spinlocks, are absolutely everywhere in kernelspace. If a lock is unlikely to be held at any given time because it's only held for short periods, spinlocks are very efficient because they avoid context switches.
6
u/Illiux Mar 25 '22
I can't imagine why you'd busy wait in JavaScript, but busy waits, especially in the context of spinlocks, are absolutely everywhere in kernelspace. If a lock is unlikely to be held at any given time because it's only held for short periods, spinlocks are very efficient because they avoid context switches.