This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-09
Channels
- # beginners (121)
- # boot (28)
- # cider (106)
- # clara (57)
- # cljs-dev (70)
- # cljsrn (6)
- # clojure (145)
- # clojure-dev (7)
- # clojure-italy (36)
- # clojure-russia (42)
- # clojure-spec (26)
- # clojure-uk (127)
- # clojurescript (103)
- # core-async (10)
- # cursive (56)
- # datascript (66)
- # datomic (16)
- # defnpodcast (1)
- # emacs (18)
- # events (6)
- # figwheel (1)
- # jobs (1)
- # luminus (1)
- # lumo (44)
- # off-topic (58)
- # om (17)
- # onyx (2)
- # parinfer (75)
- # pedestal (4)
- # re-frame (18)
- # ring (4)
- # ring-swagger (8)
- # rum (7)
- # spacemacs (7)
- # specter (2)
- # sql (4)
- # unrepl (39)
- # untangled (17)
- # vim (3)
- # yada (21)
Can anyone help me see what i'm doing wrong with my transducer it seems to work for collections but not channels. When I log it looks like the 1 arity function gets called every input and it only gets called once when I run with a collection.
the channel also seems to be calling the let [prev (volatile! [])] every time as well.
hard to say without seeing the code, but in general, I would not use a stateful transducer with a channel, ever
I would add a println before the let of prev to verify it is being called more than once
if it is actually being executed more than once, make sure you aren't creating more than one channel that uses chunk-of and your results aren't being confused
I think it may because i'm using pipeline? So if you wouldn't use a stateful transducer would you just create a new channel with the "chunked" results?
I think there’s actually a ticket about this in core.async