4 ms·
Not for the single producer multi consumer case, which is approximately the most useful case. (For me, anyway.) If you have multiple producers and consumers th
by sillysaurusx 5y ago
Not for the single producer multi consumer case, which is approximately the most useful case. (For me, anyway.)
If you have multiple producers and consumers though, then yes. But it's very cool to me that you can do without the spinlock in any useful case.
- secondcoming 5y agoAre you sure? It's been a while since I ported it to C++ and so maybe the code has changed, but doesn't the producer have to wait for all consumers to consume, and don't consumers have to wait for the producer to produce? The BlockingWaitStrategy was mutex based IIRC.
- sillysaurusx 5y agoThe original whitepaper goes into detail about where the lock isn't necessary: https://lmax-exchange.github.io/disruptor/files/Disruptor-1.0.pdf https://lmax-exchange.github.io/disruptor/files/Disruptor-1.... I did this in 2011 or so, so it's been a decade. But my feelings are, "I'm quite certain that if I were to re-read the paper from start to finish, I'd end up feeling convinced of the position I just tried to convince you of." If that's not true, then I'm simply a fool, and will happily concede. :) But! For now, I have to go look at a house that we're thinking of renting.
- deleted 5y ago[deleted]