Skip to content

Commit 3fe61b1

Browse files
authored
Use FastThreadLocalThread (#595)
* Use FastThreadLocalThread
1 parent cfd65a8 commit 3fe61b1

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
(def other-dependencies
1414
'[[org.clojure/tools.logging "1.1.0" :exclusions [org.clojure/clojure]]
15-
[manifold "0.2.3"]
15+
[manifold "0.2.4"]
1616
[org.clj-commons/byte-streams "0.3.0"]
1717
[org.clj-commons/primitive-math "1.0.0"]
1818
[potemkin "0.4.5"]])

src/aleph/netty.clj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
[manifold.stream :as s]
99
[manifold.stream.core :as manifold]
1010
[clj-commons.primitive-math :as p]
11-
[clojure
12-
[string :as str]
13-
[set :as set]]
1411
[potemkin :as potemkin :refer [doit doary]])
1512
(:import
1613
[java.io IOException]
@@ -29,7 +26,6 @@
2926
EpollSocketChannel
3027
EpollDatagramChannel]
3128
[io.netty.util Attribute AttributeKey]
32-
[io.netty.handler.codec Headers]
3329
[io.netty.channel.nio NioEventLoopGroup]
3430
[io.netty.channel.socket ServerSocketChannel]
3531
[io.netty.channel.socket.nio
@@ -56,7 +52,7 @@
5652
ResourceLeakDetector$Level]
5753
[java.net URI SocketAddress InetSocketAddress]
5854
[io.netty.util.concurrent
59-
GenericFutureListener Future]
55+
FastThreadLocalThread GenericFutureListener Future]
6056
[java.io InputStream File]
6157
[java.nio ByteBuffer]
6258
[io.netty.util.internal SystemPropertyUtil]
@@ -803,7 +799,8 @@
803799
#(str prefix "-" (swap! num-threads inc))
804800
(deliver (promise) nil)
805801
nil
806-
daemon?)))
802+
daemon?
803+
(fn [group target name stack-size] (FastThreadLocalThread. group target name stack-size)))))
807804

808805
(def ^String client-event-thread-pool-name "aleph-netty-client-event-pool")
809806

0 commit comments

Comments
 (0)