Posted By

ef on 02/17/12


Tagged

Threads


Versions (?)

Starting multiple threads


 / Published in: Clojure
 

Creates number of threads (specified by 'threads-number') running fn-name function. This is possible, because every Clojure function implements Runnable interface.

  1. (doall (take threads-number (repeatedly #(doto (Thread. fn-name) (.start)))))

Report this snippet  

You need to login to post a comment.