Skip to content

Commit 6d9fc5a

Browse files
committed
use pre-1.12 compatible interop syntax
1 parent 17b0538 commit 6d9fc5a

File tree

1 file changed

+6
-7
lines changed
  • src/main/clojure/clojure/core/async/flow

1 file changed

+6
-7
lines changed

src/main/clojure/clojure/core/async/flow/impl.clj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@
3434

3535
(defn futurize ^Future [f {:keys [exec]}]
3636
(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))))
37+
(let [^ExecutorService exec (case exec
38+
:compute compute-exec
39+
:io io-exec
40+
:mixed mixed-exec
41+
exec)]
42+
(.submit exec ^Callable #(apply f args)))))
4443

4544
(defn prep-proc [ret pid {:keys [proc, args, chan-opts] :or {chan-opts {}}}]
4645
(let [{:keys [ins outs]} (spi/describe proc)

0 commit comments

Comments
 (0)