concurrentqueue icon indicating copy to clipboard operation
concurrentqueue copied to clipboard

Program crashed when it calls try_dequeue_bulk, how to handle this ?

Open driftli opened this issue 3 years ago • 1 comments

image

Here is my structure definition: image

And some codes: image

driftli avatar Aug 15 '22 06:08 driftli

Don't see anything wrong with the code posted. Can you reduce it to a self-contained example?

cameron314 avatar Aug 15 '22 11:08 cameron314

Hi @cameron314, I didn't know where to ask exactly so I'm using this issue. Related to bulk operations, can they be used with STL containers (such as an std::vector or an std::list), or just with plain old arrays like in this issue? I see *dequeue_bulk* methods accept a sort of iterator, but I'm not sure what to pass. Thank you

gentooise avatar Dec 16 '22 15:12 gentooise

Yes, any output iterator will do for dequeue_bulk, and any input iterator for enqueue_bulk.

cameron314 avatar Dec 16 '22 15:12 cameron314