相关疑难解决方法(0)

在Eclipse/CounterClockWise中使用线程时,输出将发送到控制台而不是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"))
Run Code Online (Sandbox Code Playgroud)

当我执行它时,部分输出显示在REPL中,而另一部分显示在控制台中(由于我通常将其隐藏起来因为我不使用它而弹出).

我想将所有输出发送到REPL窗口,我该如何实现?

eclipse clojure counterclockwise

5
推荐指数
1
解决办法
1279
查看次数

标签 统计

clojure ×1

counterclockwise ×1

eclipse ×1