File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
src/main/clojure/clojure/core/async Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 133133 [g pid cmd-id more-kvs] (g/command-proc g pid cmd-id more-kvs))
134134
135135(defn inject
136- " synchronously puts the messages on the channel corresponding to the
137- input or output of the process"
136+ " asynchronously puts the messages on the channel corresponding to the
137+ input or output of the process, returning a future that will
138+ complete when done."
138139 [g [pid io-id :as coord] msgs] (g/inject g coord msgs))
139140
140141(defn process
Original file line number Diff line number Diff line change 7979 (let [{:keys [control]} (running-chans )]
8080 (async/>!! control #::flow{:command command :to to})))]
8181 (reify
82- clojure.core.async.flow.impl.graph.Graph
82+ clojure.core.async.flow.impl.graph.Graph
8383 (start [_]
8484 (.lock lock)
8585 (try
170170 (inject [_ coord msgs]
171171 (let [{:keys [resolver]} (running-chans )
172172 chan (spi/get-write-chan resolver coord)]
173- (doseq [m msgs]
174- (async/>!! chan m)))))))
173+ ((futurize #(doseq [m msgs]
174+ (async/>!! chan m))
175+ {:exec :io })))))))
175176
176177(defn handle-command
177178 [pid pong status cmd]
You can’t perform that action at this time.
0 commit comments