Skip to content

Commit c5a524c

Browse files
committed
s/workflow/workload
1 parent 81794e9 commit c5a524c

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
7676
:mixed-exec/:io-exec/:compute-exec -> ExecutorService
7777
These can be used to specify the ExecutorService to use for the
78-
corresonding workflow, in lieu of the lib defaults.
78+
corresonding workload, in lieu of the lib defaults.
7979
8080
N.B. The flow is not started. See 'start'"
8181
[config] (impl/create-flow config))
@@ -210,18 +210,18 @@
210210
fn.
211211
212212
process accepts an option map with keys:
213-
:workflow - one of :mixed, :io or :compute
214-
:compute-timeout-ms - if :workflow is :compute, this timeout (default 5000 msec)
213+
:workload - one of :mixed, :io or :compute
214+
:compute-timeout-ms - if :workload is :compute, this timeout (default 5000 msec)
215215
will be used when getting the return from the future - see below
216216
217-
A :workflow supplied as an option to process will override
218-
any :workflow returned by the :describe fn of the process. If neither
217+
A :workload supplied as an option to process will override
218+
any :workload returned by the :describe fn of the process. If neither
219219
are provded the default is :mixed.
220220
221221
The :compute workload is not allowed for proc impls that
222222
provide :introduce (as I/O is presumed).
223223
224-
In the :workflow context of :mixed or :io, this dictates the type of
224+
In the :workload context of :mixed or :io, this dictates the type of
225225
thread in which the process loop will run, _including its calls to
226226
transform/introduce_.
227227
@@ -237,7 +237,7 @@
237237
238238
When :compute is specified transform must not block!"
239239
([process-impl-map] (process process-impl-map nil))
240-
([process-impl-map {:keys [workflow timeout-ms]
240+
([process-impl-map {:keys [workload timeout-ms]
241241
:or {timeout-ms 5000} :as opts}]
242242
(impl/proc process-impl-map opts)))
243243

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@
214214

215215
(defn proc
216216
"see lib ns for docs"
217-
[{:keys [describe init transition transform introduce] :as impl} {:keys [workflow compute-timeout-ms]}]
217+
[{:keys [describe init transition transform introduce] :as impl} {:keys [workload compute-timeout-ms]}]
218218
(assert (= 1 (count (keep identity [transform introduce]))) "must provide exactly one of :transform or :introduce")
219219
(let [{:keys [params ins] :as desc} (describe)
220-
workflow (or workflow (:workflow desc) :mixed)]
220+
workload (or workload (:workload desc) :mixed)]
221221
(assert (not (and ins introduce)) "can't specify :ins when :introduce")
222222
(assert (or (not params) init) "must have :init if :params")
223-
(assert (not (and introduce (= workflow :compute))) "can't specify :introduce and :compute")
223+
(assert (not (and introduce (= workload :compute))) "can't specify :introduce and :compute")
224224
(reify
225225
clojure.core.protocols/Datafiable
226226
(datafy [_]
@@ -229,11 +229,11 @@
229229
spi/ProcLauncher
230230
(describe [_] desc)
231231
(start [_ {:keys [pid args ins outs resolver]}]
232-
(let [comp? (= workflow :compute)
233-
transform (cond-> transform (= workflow :compute)
232+
(let [comp? (= workload :compute)
233+
transform (cond-> transform (= workload :compute)
234234
#(.get (futurize transform {:exec (spi/get-exec resolver :compute)})
235235
compute-timeout-ms TimeUnit/MILLISECONDS))
236-
exs (spi/get-exec resolver (if (= workflow :mixed) :mixed :io))
236+
exs (spi/get-exec resolver (if (= workload :mixed) :mixed :io))
237237
io-id (zipmap (concat (vals ins) (vals outs)) (concat (keys ins) (keys outs)))
238238
control (::flow/control ins)
239239
;;TODO rotate/randomize after control per normal alts?

0 commit comments

Comments
 (0)