3 ms·
One child asks, "are we there yet?" continuously until the answer changes. The other asks you to wake her once you get there, and goes to sleep. The spinlockin
by closeparen 7y ago
One child asks, "are we there yet?" continuously until the answer changes. The other asks you to wake her once you get there, and goes to sleep.
The spinlocking child will react to his arrival faster, but the sleeping (mutex) child makes a more efficient use of your attention.