Lowest price ever! Learn Generative AI for 48% less!
Get my discount
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 Answer
+ 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