Elimination can be enhanced by using a combination strategy, such as DECS [1]. Using a combiner approach should also work on a queue structure, though interestingly enough there is a paper on elimination-based fifo queues. I wrote an elimination stack in Java [2], but I haven't gotten around to adding combining to the arena yet. The performance is pretty good compared to other shared concurrent structures.<p>[1] <a href="http://www.cs.bgu.ac.il/~hendlerd/papers/DECS.pdf" rel="nofollow">http://www.cs.bgu.ac.il/~hendlerd/papers/DECS.pdf</a>
[2] <a href="https://github.com/ben-manes/caffeine" rel="nofollow">https://github.com/ben-manes/caffeine</a>
> back-off<p>Another solution is to simply return false and leave the decision of what to do, to the caller. Effectively:<p><pre><code> bool try_push(value_type& value);
bool try_pop(value_type* result);
</code></pre>
Most callers will simply:<p><pre><code> while(!try_push(&val)) bkoff();
</code></pre>
However, in my specific case I was writing a toy thread pool. This meant that a failed pend could just result in an attempt to pend it to a different worker thread, instead of trying the same stack over again.