Advertisement
Guest User

Untitled

a guest
Dec 27th, 2011
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. (defn #^ForkJoinTask mk-task [the-fn & args]
  2. (let [#^Callable no-arg-fn (if (empty? args)
  3. the-fn
  4. #(apply the-fn args))]
  5. (ForkJoinTask/adapt no-arg-fn)))
  6.  
  7. (defn #^ForkJoinTask apply-fork [the-fn & args]
  8. (.fork #^ForkJoinTask (apply mk-task the-fn args)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement