[NREPL-40] Thread leak in clojure.tools.nrepl.transport$fn_transport? Created: 11/Mar/13 Updated: 19/Aug/14 Resolved: 19/Aug/14
|Affects Version/s:||0.2.1, 0.2.2|
|Reporter:||David Lao||Assignee:||Chas Emerick|
Windows 7 x64, Oracle JDK 22.214.171.124 x64, clojure 1.4.0
When trying out remote eval using your sample in the README, ie
(with-open [conn (repl/connect :port 59258)]
I'm noticing that hosting process leaking a thread each time the remote eval is called. Jconsole shows a clojure-agent-send-off-pool-xxx thread got spawn as result of the call. The stack appears to be pointing to the "while true" loop inside fn_transport.
What do you recommend as way to free the thread? I have server code that calls nrepl on behave of client connections and the number of call can pile up fairly quickly.
|Comment by David Lao [ 12/Mar/13 3:37 PM ]|
Here is my workaround.
|Comment by Chas Emerick [ 06/Aug/13 5:47 AM ]|
Very nice catch. I'd love to have a patch from you; do you have a CA filed? (see http://clojure.org/contributing)
|Comment by Chas Emerick [ 18/Apr/14 10:07 AM ]|
Ping: did you send in a CA? Would love to apply a patch from you for this.
|Comment by Chas Emerick [ 19/Aug/14 8:43 PM ]|
I wanted to get this out as part of 0.2.4, so implemented my own patch, committed as 20a3d15. Thanks for the report!