rigtorp / MPMCQueue

A bounded multi-producer multi-consumer concurrent queue written in C++11
MIT License
1.18k stars 160 forks source link

push_front ? #3

Closed cdemez closed 6 years ago

cdemez commented 6 years ago

Hi,

Is there a way to have a push_front (instead of a push_back) ?

rigtorp commented 6 years ago

I guess you want a lock-free stack. There should be implementations of this available.

cdemez commented 6 years ago

Thanks for your answer,

But no, I need both push_back and push_front, like we found in std:vector etc ... !

rigtorp commented 6 years ago

I'm not aware of a lock free datastructure that supports that. Never ran into the problem. Check out this paper: http://www.cs.rochester.edu/~scott/papers/1996_PODC_queues.pdf might give you some hints.

On Thu, Oct 12, 2017 at 2:24 AM cdemez notifications@github.com wrote:

Thanks for your answer,

But no, I need both push_back and push_front, like we found in std:vector etc ... !

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/rigtorp/MPMCQueue/issues/3#issuecomment-336043648, or mute the thread https://github.com/notifications/unsubscribe-auth/AAK3a81hp71IZk3DgH7hqODUKLxTtSqRks5srb6QgaJpZM4P1u-A .