Regarding Thread pooling
Cliff Wells
LogiplexSoftware at earthlink.net
Tue Jul 15 14:33:51 EDT 2003
On Tue, 2003-07-15 at 04:05, sujata wrote:
> Hi,
> I have a query regarding threads.
> Is it possible to create thread pools in python.i.e. create threads
> and then retrieve the memory allocated to it so that the same threads
> can be used over and over again rather than creating new threads each
> time i wish to execute functions many times. If its possible plz do
> let me know how to do so.
> Can one have control over memory this way?
Not exactly in the terms you put it in, but yes, more or less. Use a
Queue (see the standard library) and have your pool of threads wait on
it. When there's work to be done, put it on the queue.
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 (800) 735-0555
More information about the Python-list
mailing list