Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #30 Parallelize execution of 1000 independent tasks

Launch the concurrent execution of the procedure f with parameter i from 1 to 1000.
Tasks are independent and f(i) doesn't return any value.
Tasks need not run all at the same time, so you may use a pool.

(dorun (pmap f (range 1 1001)))

New implementation...
< >
programming-idioms.org