concurrentqueue icon indicating copy to clipboard operation
concurrentqueue copied to clipboard

ImplicitProducer try_enqueue in multi thread may not act as expected

Open pavel2003 opened this issue 6 months ago • 1 comments

By default, a queue can store 1024 items. However, when multiple threads insert data into the same queue under the ImplicitProducer mode, switching between producers causes try_enqueue to fail before reaching 1024 items.

The reason is that after switching producers, try_get_block_from_initial_pool is called again, resulting in each block storing fewer than 32 items before switching occurs.

​Is this an issue or expected behavior?​​

pavel2003 avatar Jul 08 '25 02:07 pavel2003