This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-24
Channels
- # announcements (3)
- # beginners (128)
- # boot (2)
- # braveandtrue (97)
- # calva (13)
- # cider (4)
- # cljdoc (12)
- # cljs-dev (16)
- # clojure (78)
- # clojure-germany (8)
- # clojure-italy (5)
- # clojure-nl (1)
- # clojure-spec (59)
- # clojure-uk (29)
- # clojurescript (46)
- # core-async (9)
- # cursive (63)
- # data-science (3)
- # datomic (22)
- # devcards (1)
- # duct (7)
- # emacs (4)
- # flambo (2)
- # fulcro (37)
- # instaparse (6)
- # jobs-discuss (38)
- # juxt (1)
- # off-topic (35)
- # om-next (1)
- # parinfer (7)
- # re-frame (14)
- # reagent (6)
- # reitit (21)
- # rum (1)
- # shadow-cljs (74)
- # spacemacs (8)
- # specter (1)
- # sql (3)
- # testing (2)
- # unrepl (2)
- # yada (6)
I’m using a pipeline-blocking
and keeping the to
channel around for later reference. At a certain point (when I detect an error), I want to close!
the to
channel, which, according to the documentation (as far as I can read) should stop consumption from the from
channel. However, my xf
, which processes the from
output and puts it on the to
, does some printing as a side effect, and I can see that it is printing for all of the entries from from
even after I call (close! to)
. Am I misunderstanding something?
looks like nobody’s responded — I’ve held off because I don’t know the answer and have not had time to dig in myself. however, I can say when it comes to these sorts of details with core.async I’ve just studied the source. Generally it’s not a bug but a subtle characteristic of the tool.
and pipeline
s are designed to use feedback from the from
channel’s open/closed status to update its internal state, not the to
channel’s status
so in summary — I don’t think the docs guarantee that closing the to
channel immediately halts execution & processing of messages from the from
channel
a promise chan for flagging an error state consumed by an explicit non-blocking take (prioritized alts or poll) immediately before the side-effecting code comes to mind first
(To be clear; I am not calling pipeline-blocking
with a close?
argument, rather, I am calling (close! to)
manually.)