2 ms·
The semantics of latch are a little simpler, which leaves room for a lighter weight implementation than is typically associated with condition variables. Barrie
by PaulDavisThe1st 6y ago
The semantics of latch are a little simpler, which leaves room for a lighter weight implementation than is typically associated with condition variables. Barriers are closer, but also have slightly simpler semantics, again allowing for a potentially lighter weight implementation.
But the semantics are not sufficiently different as to allow for any notably new use cases/code flow, certainly not from the examples I've seen. Every one of them could have been written using condition variables at any point in the last 30 years and would look almost indistinguishable.