Queue.Queue-like class without the busy-wait

Antoon Pardon apardon at forel.vub.ac.be
Fri Mar 25 09:13:50 CET 2005

Op 2005-03-24, Paul L. Du Bois schreef <polytope at gmail.com>:
> Has anyone written a Queue.Queue replacement that avoids busy-waiting?
> It doesn't matter if it uses os-specific APIs (eg
> WaitForMultipleObjects).  I did some googling around and haven't found
> anything so far.

I started once, using the Timer class in the Threading Module to
break the lock. However the Timer class uses the same kind of
sleep-polling loop, to delay the exection and allow an intermediate
cancel, as the loop that is used in Queue.Queue, so that was no

I have still played with the idea, but haven't worked anything out
since then.

Antoon Pardon

More information about the Python-list mailing list