zsh-workers
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: zsh-workers@zsh.org
Subject: zargs parallelization support blows up with |&
Date: Mon, 27 Jul 2015 02:36:36 -0700	[thread overview]
Message-ID: <87lhe23psr.fsf@secretsauce.net> (raw)

Hi. I can use this to invoke a perl script 10 times, 2 processes at a
time:

 zargs -P2 -i -l1 `seq 10` -- perl -e 'sleep 20' {}

This works ok. However, when I do the same thing, but filter stdout and
stderr for some output, then ALL the processes are invoked at the same
time, not just 2 at a time like I asked:

 zargs -P2 -i -l1 `seq 10` -- perl -e 'sleep 20' {} |& grep x

I don't know if this is a bug or an expected consequence of some
internal implementation details, but this is a really nasty failure
mode.

Thanks for looking.
dima


             reply	other threads:[~2015-07-27  9:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27  9:36 Dima Kogan [this message]
2015-07-27 16:15 ` Bart Schaefer
2015-07-27 16:37   ` Bart Schaefer
2015-07-27 18:19     ` Dima Kogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lhe23psr.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).