File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 33
33
(.set executor-thread-local executor#)))))
34
34
35
35
(defn- ^Thread new-thread
36
- " Create a new `java.lang.Thread`.
36
+ " Creates a new `java.lang.Thread`.
37
37
38
38
It represents the default implementation on `thread-factory` when the
39
- `new-thread-fn` argument is not passed."
39
+ `new-thread-fn` argument is not passed.
40
+
41
+ Some libraries require a different implementation of a `java.lang.Thread`.
42
+ That's the case of Netty which behaves differently when
43
+ running on a `io.netty.util.concurrent.FastThreadLocalThread`."
40
44
[group target name stack-size]
41
45
(Thread. group target name stack-size))
42
46
Original file line number Diff line number Diff line change 56
56
57
57
(deftest test-thread-factory
58
58
(let [tf (thread-factory )]
59
- (.newThread tf (constantly nil )))
59
+ (is ( .newThread tf (constantly nil ) )))
60
60
(let [tf (thread-factory
61
61
(fn [group target _ stack-size]
62
62
(proxy [Thread] [group target " custom-name" stack-size])))
You can’t perform that action at this time.
0 commit comments