cameron314 / concurrentqueue

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

Dequeue a list using an std::vector #382

Open rogerworld opened 2 months ago

rogerworld commented 2 months ago

Hello,

First of all thank you for the great efficient queue.

I have a novice question. I need to use an std vector instead of a static array and need to reuse it in a while loop.

Do you have an example that illustrate this use case.

My concern is the follow: Do I need to clear the vector each time ?

Thank you for your help.

cameron314 commented 2 months ago

What have you tried? What isn't working? Is the element type itself a vector, or are you trying to use the bulk API?