Threading Pool Event()

Aahz aahz at
Fri Jul 18 15:09:25 CEST 2003

In article <0tRRa.212$vD1.8077 at>,
Graeme Matthew <gsmatthew at> wrote:
>I just cannot seem to find any documentation that shows an example of
>using the factory method Event() in threads. I have a thread pool and
>if there are no jobs in a Queue I want them to wait for something to
>be inserted. When a job is inserted I want to send an Event, the first
>thread that picks it up runs with the job the rest wait for another
>insert Event.

Given that you're already using a Queue, there is no, repeat NO, reason
for using an Event.  Just have your threads block on the Queue.
Aahz (aahz at           <*>

A: No.
Q: Is top-posting okay?

More information about the Python-list mailing list