This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-01
Channels
- # adventofcode (11)
- # aws (8)
- # beginners (70)
- # boot (2)
- # cider (9)
- # cljs-dev (29)
- # cljsrn (2)
- # clojure (67)
- # clojure-android (2)
- # clojure-dusseldorf (5)
- # clojure-greece (12)
- # clojure-italy (4)
- # clojure-nl (3)
- # clojure-poland (3)
- # clojure-russia (5)
- # clojure-spec (80)
- # clojure-uk (9)
- # clojurescript (73)
- # core-async (17)
- # cursive (1)
- # data-science (5)
- # datomic (29)
- # emacs (5)
- # fulcro (257)
- # graphql (2)
- # hoplon (2)
- # jobs (2)
- # klipse (3)
- # leiningen (9)
- # lumo (4)
- # nyc (1)
- # off-topic (48)
- # om (7)
- # other-languages (11)
- # pedestal (4)
- # re-frame (18)
- # remote-jobs (1)
- # rum (10)
- # shadow-cljs (5)
- # spacemacs (20)
- # sql (5)
- # test-check (44)
- # unrepl (8)
- # yada (9)
Hi Im having trouble with this piece of code to work as I expected, could somebody help?
(go-loop []
(let [ch (async/take 100 external-channel)
_ (async/close! ch)
ps (<! (async/into [] ch))]
(println "dispatch!! " ps))
(recur))
i taking 100 items from an xternal channel then put them into a vector
then Ill take that vector off from that channel
why is it looping forever even ch is empty? If I understood it right, <! should park I guess...
async/take returns at most N items, so if external-channel is closed, it will just return a closed channel, so nothing stops the loop from looping
uhhhm external channel never closes
dispatch!! []
hmmmm
thanks, Ill see what I could do...