3 ms·
Regarding "Removing locks completely", the author laments not knowing of any readily available library providing the blocking-on-necessary support. I suggest l
by gpderetta 10y ago
Regarding "Removing locks completely", the author laments not knowing of any readily available library providing the blocking-on-necessary support.
I suggest looking into Event Counts, which can be used to non-intrusively add blocking behavior to most lock free queues; they are the non-blocking world equivalent of condition variables. Facebook's Folly library provides a readily available open source implementation of Event Counts.
- no-bugs 10y agoTHANKS! I've added it (not 100% sure how it would work in practice, but certainly looks interesting).
- gpderetta 10y agoYou are welcome. Note that the event count is a general synchronization primitive, the one in folly is just an implementation. BTW, you can build an efficient event count on top of eventfd, so you can even poll/select it.