cameron314 / concurrentqueue

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

try_dequeue_bulk core dump. #369

Closed moyotar closed 9 months ago

moyotar commented 10 months ago

1631: assert(prevVal + count <= BLOCK_SIZE);

Assertion `prevVal + count <= BLOCK_SIZE' failed.

Does it mean that the queue is full and I need to use a larger BLOCK_SIZE? I don't really understand BLOCK_SIZE and confuse why I got error here.

cameron314 commented 10 months ago

This is an internal assertion and should never be hit. It indicates either a bug in the queue or in the code using it. Can you share an example that reproduces this?

moyotar commented 10 months ago

Already solved.It turned out that in my environment, except for the latest version of concurrentqueue.h.There is also a really old version of concurrentqueue.h. Then the old version came into effect. I removed the old version and found that there was no problem in using the latest version. Thanks a lot.