Skip to content

Commit e0ba619

Browse files
committed
ASYNC-260 Remove now unused pool-size property and var
1 parent 59f4952 commit e0ba619

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

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

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
(ns clojure.core.async
1010
"Facilities for async programming and communication.
1111
12-
go blocks are dispatched over an internal thread pool, which
13-
defaults to 8 threads. The size of this pool can be modified using
14-
the Java system property `clojure.core.async.pool-size`.
15-
1612
Set Java system property `clojure.core.async.go-checking` to true
1713
to validate go blocks do not invoke core.async blocking operations.
1814
Property is read once, at namespace load time. Recommended for use
@@ -58,9 +54,8 @@ return nil for unexpected contexts."
5854
)
5955
(:import [java.util.concurrent.atomic AtomicLong]
6056
[java.util.concurrent.locks Lock]
61-
[java.util.concurrent Executors Executor ThreadLocalRandom]
62-
[java.util Arrays ArrayList]
63-
[clojure.lang Var]))
57+
[java.util.concurrent ThreadLocalRandom]
58+
[java.util Arrays ArrayList]))
6459

6560
(alias 'core 'clojure.core)
6661

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

+2-13
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
(ns ^{:skip-wiki true}
1010
clojure.core.async.impl.dispatch
11-
(:require [clojure.core.async.impl.protocols :as impl])
1211
(:import [java.util.concurrent Executors ExecutorService ThreadFactory]))
1312

1413
(set! *warn-on-reflection* true)
@@ -36,16 +35,6 @@
3635
(.setName (format name-format (swap! counter inc)))
3736
(.setDaemon daemon))))))))
3837

39-
(defonce
40-
^{:doc "Number of processors reported by the JVM"}
41-
processors (.availableProcessors (Runtime/getRuntime)))
42-
43-
(def ^:private pool-size
44-
"Value is set via clojure.core.async.pool-size system property; defaults to 8; uses a
45-
delay so property can be set from code after core.async namespace is loaded but before
46-
any use of the async thread pool."
47-
(delay (or (Long/getLong "clojure.core.async.pool-size") 8)))
48-
4938
;; used only for implementing go-checking
5039
(def ^:private ^:dynamic *in-go-dispatch* false)
5140

@@ -69,8 +58,8 @@
6958
nil)
7059

7160
(defn- make-ctp-named
72-
[workflow]
73-
(Executors/newCachedThreadPool (counted-thread-factory (str "async-" (name workflow) "-%d") true)))
61+
[workload]
62+
(Executors/newCachedThreadPool (counted-thread-factory (str "async-" (name workload) "-%d") true)))
7463

7564
(defn ^:private create-default-executor
7665
[workload]

0 commit comments

Comments
 (0)