Hi,
I'm currently having trouble implementing the thread sleeping mechanism when 
the queue is out of tasks.
Problem is, it's hard to maintain consistency between the thread sleeping 
routine and the queues.
See the pseudocode below,
 
1. check queue is empty
2. go to sleep
 
if we go lock-free, the consistency between 1 and 2 cannot be maintained.
Moreover, if we go to a multi-queue setting, simply checking whether all the 
queues are empty is not consistent. 
I would really like to have the thread sleeping mechanism but I'm not sure how 
we could do it.
 
Ray Kim

Reply via email to