0
Thread safe queue
Hi all I belive we can have thread safe queue by using condition variable and mutex. However, I got answer than when condition variable notify the sleeping / waiting thread, it looses some micro seconds. So this is not best effective way. How can we implement the thread safe queue faster than this one ? Any ideas will be helpful.
1 Antwort
+ 1
Have you tried lock free queue?
refer this,
https://www.drdobbs.com/parallel/lock-free-queues/208801974