[NREPL-40] Thread leak in clojure.tools.nrepl.transport$fn_transport? Created: 11/Mar/13 Updated: 06/Aug/13
|Affects Version/s:||0.2.1, 0.2.2|
|Reporter:||David Lao||Assignee:||Chas Emerick|
Windows 7 x64, Oracle JDK 220.127.116.11 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)