5
我嘗試這個代碼從this指南:的輸出被髮送在Eclipse使用線程時代替控制檯REPL的/逆時針
(defn my-fn [ms]
(println "entered my-fn")
(Thread/sleep ms)
(println "leaving my-fn"))
(let [thread (Thread. #(my-fn 1))]
(.start thread)
(println "started thread")
(while (.isAlive thread)
(print ".")
(flush))
(println "thread stopped"))
當我執行它,則輸出的部分示出了在REPL,和其他部分顯示在控制檯(彈出,因爲我通常隱藏它,因爲我不使用它)。
我想將所有的輸出發送到REPL窗口,我該怎麼做到這一點?