This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-09
Channels
- # aleph (9)
- # bangalore-clj (1)
- # beginners (3)
- # boot (58)
- # cider (19)
- # cljs-dev (5)
- # cljsrn (31)
- # clojure (35)
- # clojure-greece (1)
- # clojure-poland (4)
- # clojure-russia (1)
- # clojure-spec (65)
- # clojure-uk (1)
- # clojurescript (41)
- # data-science (2)
- # datascript (6)
- # devcards (3)
- # emacs (2)
- # hoplon (10)
- # liberator (3)
- # numerical-computing (1)
- # off-topic (1)
- # om (18)
- # onyx (17)
- # parinfer (1)
- # planck (1)
- # re-frame (13)
- # specter (7)
- # uncomplicate (1)
- # untangled (4)
- # vim (1)
- # yada (2)
i have what i suspect to be a problem with a blocking core async channel. Noobishly, I dont see how how my test differs from the example i see in learn onyx 6_1 example. In my code their isn’t the “bind-inputs” function, however, that just puts elements on the channel. In my program this is done directly inside the body of my test. I’m not sure how to troubleshoot the issue as the only feedback i get is that the program hangs, as i would expect if i put to many items on the channel. However the channel size is very large (10,000) and i dont see what mechanism prevents this in the learning onyx example. https://github.com/onyx-platform/learn-onyx/blob/master/test/workshop/jobs/challenge_6_1_test.clj I’m hoping this is a 10 second diagnosis for someone with more experience with core.async (which is the aspect i think im confused about). Dont spend any longer then that on it 🙂
@drewverlee I have a guess about what’s going on. Give me a bit, just got back from a run.
@drewverlee can you try onyx 0.9.12-20161009.151014-2?
Pretty sure it’s only opening a channel of size 1000, due to a bug in the core async plugin
I'll try it when I get back to my comp in an hour or so
Sure, thanks
@lucasbradstreet i said 10,000 but i mean 1000 as is defined here https://github.com/onyx-platform/onyx/blob/75a48ce99f7d9cc829ea27922d987617abc7c5ac/src/onyx/tasks/core_async.clj > can you try onyx 0.9.12-20161009.151014-2? I’m not sure what that means
That’s the new snapshot version number for Onyx. It’s a fixed snapshot version
At what point is it hanging?
the last print statment i get get to fire is after the promise is supposed to be delievered Starting Onyx test environment false false Trigger for :collect-heating-and-cooling window #inst "2016-10-14T04:00:00.000-00:00" #inst "2016-10-14T04:04:59.999-00:00" promise checked promise true after promise
(add-watch c/fired-window-state :watcher
(fn [k r old new]
(let [n (swap! n-trigger-fires inc)]
(println "promise checked")
;; This time, we have 1
;; buckets - so we wait for 1 updates.
(when (= n 1)
(deliver p true)
(println "promise true"))
(println "after promise"))))
so adding (>!! in :done)
seems to stop it from hanging. I was 90% sure i wasn’t closing the channel correctly, or rather, that the channel was blocking and i assumed that was the cause of the hang.
I suppose i was looking for where in the code thats actual … done 🙂.
but knowing is good enough for now.
i felt like that was one of the first things i tried, but i must of mucked it up with another change.