multiprocessing and threads

Deepak Rokade smartpawn at gmail.com
Mon Dec 28 01:20:24 EST 2009


Are there any special guidelines for using multiprocessing package and
threads in python program.

I am designing a application that works with database and files.



In my program I was spawning some threads and then some process pools.  Only
my main process use the threads and my child processes do not use any of the
threads that were copied due to fork call.



I observed that while creating the process pools some fork calls were
hanging.



I changed the sequence and then spawned process pools and then threads. This
gave me better results and none of the fork then hanged.



Is there any limitation based on sequence of threads and process ? Any
specific issues ?


Thanks
Deepak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091228/1b5a4f4b/attachment-0001.html>


More information about the Python-list mailing list