Why can't I print from background threads in Clojure Cider REPL in emacs? -
If I try to evaluate the following code in my emacs cider-repl, it is expected, but someone Not even in print per buffer or console How do I print it?
(dotstart [i5] (.start (thread. (FN [] (thread / sleep (rand 500)) (println (format "= & gt;% s" / CurrentThread)))))));% d; Zero This works fine, however:
(println (format "% s is at% s" (thread / current thread)) ; = & Gt; 1 end on thread [nREPL worker-18.5, main] ----------- Mini buffer ---------------- - Void println on a dynamic bound called Is to use * out * as Emacs dynamically copied buffer code as your output stream A rip binds to go to * out * , but if you make a thread, that code becomes the * out * root binding * Out * , which will not be buff in case of cider.
If you started repl using in cider-jack , when you Look at yourself the buffer list there should be a buffer with a name like * nrepl-server * which is the root output of * * binding. After running your code here's my content:
NREP server host 127.0.0.1 started at port 52034 - nrepl: //127.0.0.1: 52034 thread ended 1 thread [thread- 9, 5, main] 2 threads ending at 0 [thread-8,5, main] on the thread thread [Thread-10,5, main] 3 thread [thread-11,5, main] on the finished thread ] 4 threads ending at thread [thread-12,5, main] in cider-jack , then output terminal where nrepl To start the process Will print.
Comments
Post a Comment