I found a pretty/small solution (but not optimized)
http://stackoverflow.com/questions/38160/parallelize-bash-script
I'm quoting the solution (the solution can be used as-is in zsh too)
> Here an alternative solution that can be inserted into .bashrc and used for
> everyday one liner:
>
> function pwait() {
> while [ $(jobs -p | wc -l) -ge $1 ]; do
> sleep 1
> done
> }
>
> To use it, all one has to do is put & after the jobs and a pwait call, the
> parameter gives the number of parallel processes:
>
> for i in *; do
> do_something $i &
> pwait 10
> done
>
> It would be nicer to use wait instead of busy waiting on the output of jobs
> -p, but there doesn't seem to be an obvious solution to wait till any of the
> given jobs is finished instead of a all of them.
>
--
ÂDans la vie, rien n'est Ã craindre, tout est Ã comprendreÂ
Marie Sklodowska Curie.