On Wed, Apr 23, 2008 at 1:36 PM, Tim Golden <[EMAIL PROTECTED]> wrote:

> Yes, that's a typical setup for Queue: the main thread creates a
> Queue and passes it to each thread it creates. Say you had an example
> where you had a pool of worker threads, each one performing a
> calculation. A common approach is to have two Queues: request &#
> response. The code would look something like this (entirely untested):
>

There are many threadpool examples in the online Python cookbook, for
example this one (picked mostly at random - see also links from there, the
'threading' topic of the cookbook, or search for 'pool'):
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/435883

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to