2 ms·
Indeed, that's the basic missed wake-up scenario for a signaling primitive. With condition variables (as a general primitive, not specifically in Go) checking
by gpderetta 2y ago
Indeed, that's the basic missed wake-up scenario for a signaling primitive.
With condition variables (as a general primitive, not specifically in Go) checking the for the condition and waiting must be done atomically, by holding the lock, as condition variables are stateless.
Evencounts and futexes (aka keyed events) are similar edge triggered primitives, but they don't require an user visible lock to be held as atomicity is guaranteed in other ways.