In article <a852a388-2e3f-4b45-aa80-695fc116e...@v18g2000pro.googlegroups.com>,
Power Button  <mjbuc...@gmail.com> wrote:
>
>I wonder if anyone can help with the following. I have written a
>script which polls a server and if it finds and pending orders, it
>instantiates an new object (foo) - in a new thread and processes some
>data. In the new object (foo), there are also some long running
>processes so I am trying to create a thread pool/queue and to push
>items onto the queue in the instantiated object (foo). Currently I am
>creating the Queue in foo but this means I am starting up 5 new
>threads every time I instantiate foo. What I want to be able to do is
>create the Queue and start 5 (n) threads when my program starts and
>then push items onto the queue in foo.

Not sure what you're trying to do, but you meay find this sample code
useful:

http://www.pythoncraft.com/OSCON2001/index.html
-- 
Aahz (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote 
programs, then the first woodpecker that came along would destroy civilization.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to