We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17b0538 commit 6d9fc5aCopy full SHA for 6d9fc5a
src/main/clojure/clojure/core/async/flow/impl.clj
@@ -34,13 +34,12 @@
34
35
(defn futurize ^Future [f {:keys [exec]}]
36
(fn [& args]
37
- (^[Callable] ExecutorService/.submit
38
- (case exec
39
- :compute compute-exec
40
- :io io-exec
41
- :mixed mixed-exec
42
- exec)
43
- #(apply f args))))
+ (let [^ExecutorService exec (case exec
+ :compute compute-exec
+ :io io-exec
+ :mixed mixed-exec
+ exec)]
+ (.submit exec ^Callable #(apply f args)))))
44
45
(defn prep-proc [ret pid {:keys [proc, args, chan-opts] :or {chan-opts {}}}]
46
(let [{:keys [ins outs]} (spi/describe proc)
0 commit comments