by gpderetta · 10y ago · 0 comments
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.
BTW, you can build an efficient event count on top of eventfd, so you can even poll/select it.