Thread safe queue | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
+ 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