Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn #^ForkJoinTask mk-task [the-fn & args]
- (let [#^Callable no-arg-fn (if (empty? args)
- the-fn
- #(apply the-fn args))]
- (ForkJoinTask/adapt no-arg-fn)))
- (defn #^ForkJoinTask apply-fork [the-fn & args]
- (.fork #^ForkJoinTask (apply mk-task the-fn args)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement