Closed OlivierSohn closed 3 years ago
when the queue is full, try_push blocks.
Thanks for a tip, I'll see if I can reproduce it in a unit test.
I added a unit test for try_push
and it passes.
It is likely that the error was in your code, not the queue.
@max0x7ba Thanks for looking at it, I think the bug existed a year ago or so, and has been fixed since by a commit on master (or maybe I messed up something in my local version).
So I'll resync with master and everything will be fine ;)
Hello,
Using the following queue:
when the queue is full, try_push blocks.
A fix for this behaviour is here : https://github.com/OlivierSohn/cpp.algorithms/commit/37ccb8dbc95c0a1541073741166224b889a29e62
I verified that it solves my use case.
Feel free to use it!