concurrentqueue
concurrentqueue copied to clipboard
why ocassionally unexcepted clear queue
I write a parallel program that uses concurrent-queue, and most time it runs ok with very high performance. however, in an unknown situation, when the queue has about one million items, it will be empty in an unexcepted way, so I will lost many many jobs which should be in the queue.
my code is like :
moodycamel::BlockingConcurrentQueue
the information while run, I print to console window, like: -task:14733521-err:418891-queue:5103320 -task:14733521-err:418892-queue:5103297 -task:14733521-err:419156-queue:5103018 -task:14747550-err:419283-queue:0
the last row shows the queue size suddenly dropping to 0, queue size by call m_fast_queue.size_approx().
================= so anybody can give some advice, on why this happened?