From 6d9fc5a6b4e9d4cef8b51725aa9b1b47029d72ba Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Fri, 17 Jan 2025 12:48:59 -0600 Subject: [PATCH] use pre-1.12 compatible interop syntax --- src/main/clojure/clojure/core/async/flow/impl.clj | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/clojure/clojure/core/async/flow/impl.clj b/src/main/clojure/clojure/core/async/flow/impl.clj index fdbf4db..e5473a0 100644 --- a/src/main/clojure/clojure/core/async/flow/impl.clj +++ b/src/main/clojure/clojure/core/async/flow/impl.clj @@ -34,13 +34,12 @@ (defn futurize ^Future [f {:keys [exec]}] (fn [& args] - (^[Callable] ExecutorService/.submit - (case exec - :compute compute-exec - :io io-exec - :mixed mixed-exec - exec) - #(apply f args)))) + (let [^ExecutorService exec (case exec + :compute compute-exec + :io io-exec + :mixed mixed-exec + exec)] + (.submit exec ^Callable #(apply f args))))) (defn prep-proc [ret pid {:keys [proc, args, chan-opts] :or {chan-opts {}}}] (let [{:keys [ins outs]} (spi/describe proc)