ImplicitProducer try_enqueue in multi thread may not act as expected
Author: pavel2003Created Jul 8, 2025Updated Jul 8, 2025
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?
Source: cameron314/concurrentqueue