Fast and Simple SPSC Queue
Single producer single consumer (SPSC) queues form the simplest type of concurrent queues. We have a single thread producing the items, as well as a single thread consuming them concurrently - what can be simpler than that? Nevertheless, such queues ...
puzpuzpuz.dev5 min read
Francesco Nigro
forked_franz
It depends by the state of the queue. If the consumer doesn't have nothing to do, it will keep on polling, invalidating what the producer is going to offer against, slowing it down. In such cases all queues perform (nearly) the same if the bottleneck is the sharing hit. I suggest to practice active benchmarking to find it out! Disclaimer: I am one of the JCTools authors