Skip to content

Commit 4b75c57

Browse files
committed
naming and doc tweaks
1 parent 7b892c6 commit 4b75c57

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ to catch and handle."
466466
"Executes f in another thread, returning immediately to the calling
467467
thread. Returns a channel which will receive the result of calling
468468
f when completed, then close. workload is a keyword that describes
469-
the expected profile of the work performed by f, where:
469+
the work performed by f, where:
470470
471471
:io - may do blocking I/O but must not do extended computation
472472
:compute - must not ever block

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
[workflow]
7272
(Executors/newCachedThreadPool (counted-thread-factory (str "async-" (name workflow) "-%d") true)))
7373

74-
(defn ^:private default-executor-factory
74+
(defn ^:private create-default-executor
7575
[workload]
7676
(case workload
7777
:compute (make-ctp-named :compute)
@@ -101,9 +101,10 @@
101101
(let [sysprop-factory (when-let [esf (System/getProperty "clojure.core.async.executor-factory")]
102102
(requiring-resolve (symbol esf)))
103103
sp-exec (and sysprop-factory (sysprop-factory workload))]
104-
(if (= workload :core-async-dispatch)
105-
(or sp-exec (executor-for :io))
106-
(or sp-exec (default-executor-factory workload)))))))
104+
(or sp-exec
105+
(if (= workload :core-async-dispatch)
106+
(executor-for :io)
107+
(create-default-executor workload)))))))
107108

108109
(defn exec
109110
[^Runnable r workload]

0 commit comments

Comments
 (0)