bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parallelism a la make -j <n> / GNU parallel


From: Mike Frysinger
Subject: Re: Parallelism a la make -j <n> / GNU parallel
Date: Fri, 4 May 2012 12:41:03 -0400
User-agent: KMail/1.13.7 (Linux/3.3.4; KDE/4.6.5; x86_64; ; )

On Friday 04 May 2012 08:55:42 Chet Ramey wrote:
> On 5/3/12 2:49 PM, Colin McEwan wrote:
> > What I would really *like* would be an extension to the shell which
> > implements the same sort of parallelism-limiting / 'process pooling'
> > found in make or 'parallel' via an operator in the shell language,
> > similar to '&' which has semantics of *possibly* continuing
> > asynchronously (like '&') if system resources allow, or waiting for the
> > process to complete (';').
> 
> I think the combination of asynchronous jobs and `wait' provides most of
> what you need.  The already-posted alternatives look like a good start to a
> general solution.
> 
> If those aren't general enough, how would you specify the behavior of a
> shell primitive -- operator or builtin -- that does what you want?

i wish there was a way to use `wait` that didn't block until all the pids 
returned.  maybe a dedicated option, or a shopt to enable this, or a new 
command.

for example, if i launched 10 jobs in the background, i usually want to wait 
for the first one to exit so i can queue up another one, not wait for all of 
them.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]