Thread safe queue | Sololearn: Learn to code for FREE!

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.

3/24/2021 11:39:01 AM

Ketan Lalcheta

1 Answer

New Answer

+1

Have you tried lock free queue? refer this, https://www.drdobbs.com/parallel/lock-free-queues/208801974