Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Multi-core loops



I'm using a workaround in python (this is the smallest "solution" I could get)

--------------------------------------------------------------------
from multiprocessing import Pool
from glob import glob
from subprocess import call

def f(x):
  call(['echo','asy', '-f', 'png', '-render=0', x])

pool = Pool(processes=4)
pool.map(f, glob('*.asy'))
--------------------------------------------------------------------

But of course this solution dont integrate in zsh command line...

-- 
ÂDans la vie, rien n'est à craindre, tout est à comprendreÂ
Marie Sklodowska Curie.



Messages sorted by: Reverse Date, Date, Thread, Author