Fork me on GitHub
#core-async
<
2023-02-25
>
OknoLombarda09:02:56

Linux, Emacs+Cider, Clojure 1.11.1.1224, openjdk version "17.0.6" 2023-01-17, core.async 1.6.673 When trying to evaluate code

(defn test []
  (let [worker (Thread. (fn []
                          (go-loop []
                            (<! (timeout (:poll-interval cfg/env)))
                            (println "WOW"))))]
    (.start worker)))
I get error
Syntax error macroexpanding clojure.core.async/go at (src/cassi/bot.clj:43:28).
Attempting to call unbound fn: #'clojure.core.async.impl.ioc-macros/state-machine
When trying to manually compile ioc ns via
(compile 'clojure.core.async.impl.ioc-macros)
I get error
Execution error (NoClassDefFoundError) at java.lang.Class/forName0 (Class.java:-2).
Could not initialize class clojure.core.async.impl.ioc_macros__init
ERROR: Unhandled REPL handler exception processing message {:op eldoc, :ns cassi.core, :sym clojure.core.async.impl.ioc_macros__init, :session cb46feb7-3ce7-433a-8d6e-3b2a74e4e208, :id 47}
java.lang.NoClassDefFoundError: Could not initialize class clojure.core.async.impl.ioc_macros__init
What am I doing wrong?

ackerleytng17:02:57

Is there any way to get pipeline to drain the pipeline instead of closing when the channel closes? I would like to get pipeline to continue processing the rest of the data in the channel.