2 ms·
Acquiring a mutex on Linux involves reading an integer from memory. Also, the way a queue prevents two consumers from popping off the same element is the same
by jrockway 15y ago
Acquiring a mutex on Linux involves reading an integer from memory.
Also, the way a queue prevents two consumers from popping off the same element is the same way a mutex is implemented.