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.

24th Mar 2021, 11:39 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 Réponse
+ 1
Have you tried lock free queue? refer this, https://www.drdobbs.com/parallel/lock-free-queues/208801974
24th Mar 2021, 5:47 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar