Re: Parallel command execution

2012-05-28 Thread Henrik Sarvell
Ugly but... Chunk up the job and then you call wait with a sufficiently big number that each chunk's pipes have time to terminate before the next chunk. More complicated (but prettier) would be a later -> wait combo (if possible in your situation): (dm evalAll> @ (let Result (make

Re: Parallel command execution

2012-05-28 Thread José Romero
On Mon, 28 May 2012 23:51:21 +0200 Jorge Acereda wrote: > Hi, > > I need to invoke external commands for each entry in my database and > I want to run those in parallel, but restricting the number of > simultaneous jobs to a certain number to avoid bringing the machine > to its knees (sort of 'm

Parallel command execution

2012-05-28 Thread Jorge Acereda
Hi, I need to invoke external commands for each entry in my database and I want to run those in parallel, but restricting the number of simultaneous jobs to a certain number to avoid bringing the machine to its knees (sort of 'make -jN'). How would you approach such problem? Thanks, Jorge -