Closed emmenlau closed 5 years ago
Someone else asked about this recently.
I believe it's possible, but needs some changes that would reduce throughput for FIFO case. So would be best to create separate class for this.
On Fri, Feb 2, 2018, 10:01 Mario Emmenlauer notifications@github.com wrote:
This is a very nice MPMC queue! Is it possible to add LIFO functionality? It looks as if pop() could be modified to use head_.fetch_sub(1) but I am uncertain if this breaks something?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rigtorp/MPMCQueue/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/AAK3a0xJITyhRDUFeZNfw3QZ_0eWmtIUks5tQyUfgaJpZM4R3UTy .
Could you help to implement this? Your experience in this topic would be great.
This is a very nice MPMC queue! Is it possible to add LIFO functionality? It looks as if
pop()
could be modified to usehead_.fetch_sub(1)
but I am uncertain if this breaks something?