cameron314 / concurrentqueue

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

Is it possible to provide a front() method while using this queue in a MPSC enviorment? #393

Closed wangjunbo4 closed 4 months ago

wangjunbo4 commented 4 months ago

Is it possible to provide a front() method while using this queue in a MPSC enviorment?

cameron314 commented 4 months ago

No, because there's no way to guarantee it would only be used by a single consumer.

wangjunbo4 commented 4 months ago

okk, thanks