Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Multi-core loops
- X-seq: zsh-users 14591
- From: Kazuo Teramoto <kaz.rag@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Multi-core loops
- Date: Sun, 22 Nov 2009 19:05:41 -0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Og/PkU+KVjpsPhilE/vY2mQn9cwdU/i1zoRhllbDFws=; b=Q43mxNU3NTzTmXJ5uebufggC+G6SxTtFJ1v9KStkvbMoeoM1GWRXDVKy6V6WIBma0J csoLrlpFgthqKUKL9YTIB97FyZb6OdL09W0bcsyQw5tGyxcYuLi7OPciCv3IC9cqUN73 hPpEIfcjSZqIXIe3k2v1gO1IMz9VxptjMnC7I=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=cwCVMrptuL1ttrmGvs8LgZoAKFfOFZ73rlXaQk4wtDIPc4E2eKMDzbukzzrFEj8gTw oCKLV1qxhr12okkUGPVz+XZ6EKI33gzpwjz3C/rMLF+ykk5DqPRlUh9xVwd7xr2XfjDZ 75SqQz6vV4X9ih6vjPRp9T0LeWHOh+gz/wRIE=
- In-reply-to: <20090628103129.GA15270@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20090628103129.GA15270@xxxxxxxxxxxxxxxxxxxxxxxxxx>
On Sun, Jun 28, 2009 at 8:31 AM, Nadav Har'El <nyh@xxxxxxxxxxxxxxxxxxx> wrote:
> Zsh, like all shells, lets you easily do something many times in a loop.
> E.g.,
>
> Â Â Â Âfor i in ...
> Â Â Â Âdo
> Â Â Â Â Â Â Â Âdosomething $i
> Â Â Â Âdone
>
> But when "dosomething" is CPU intensive, this is *not* what you'd want to
> do on a multi-core (multi CPU) machine, which have more-or-less become
> standard nowadays...
> Such a loop would only use one of the CPUs, and leave the other(s) unused.
> Instead, you'll want to keep all CPUs busy all the time, running M (=number
> of CPUs) processes at the same time.
Any update on this?
I'm searching for a solution. Perhaps this can't be done as a built-in
syntax but what about a more complex solution. I'm a noob (and with
the numbers of features of zsh, I'm gonna be a noob forever), and cant
find a small, beautiful, zsh-is-so-cool-ish solution for it and dont
know how to effective implement it e.g., without using python, I like
some zsh only solution.
How people solved this problem any home-made solution for this, any tip?
Thanks!
--
ÂDans la vie, rien n'est à craindre, tout est à comprendreÂ
Marie Sklodowska Curie.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author