fork() and wait()

Delaney, Timothy tdelaney at avaya.com
Tue Oct 15 02:11:30 CEST 2002


> From: Chuck May [mailto:NmOaSyPcAM at imsweb.com]
> 
> I am trying to write an application that forks off processes 
> and waits 
> for everything to complete before doing other calculations.  The one 
> catch is that I would like to limit the number of concurrent child 
> processes.  In other words, let's say I have 10 "jobs" that 
> need to be 
> done, but I'd like no more than 4 running at the same time.  Here is 
> what I cane up with:

Queue.Queue is your friend.

Tim Delaney




More information about the Python-list mailing list