cameron314 / concurrentqueue

A fast multi-producer, multi-consumer lock-free concurrent queue for C++11
Other
9.53k stars 1.66k forks source link

Why not provide the wait_enqueue API? Is there any difficulty? #298

Open caipengbo opened 2 years ago

caipengbo commented 2 years ago

When I use blockingconcurrentqueue, I notice that the wait_enqueue API is not provided, which will blocks when it find no space.

What I want to know is, are we not implementing the API because of any difficulties or is it difficult to implement the API in the current implementation?

cameron314 commented 2 years ago

It would be non-trivial to implement. See #53.

There would also be extra overhead for every enqueue and dequeue operation.

caipengbo commented 2 years ago

Thank you. I should have searched the content of closed issue first, so I bothered you.

cameron314 commented 2 years ago

No bother!