This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-05
Channels
- # admin-announcements (8)
- # beginners (73)
- # boot (14)
- # cljsrn (4)
- # clojure (157)
- # clojure-indonesia (1)
- # clojure-poland (1)
- # clojure-russia (3)
- # clojurecup (32)
- # clojurescript (123)
- # clojurex (4)
- # core-async (8)
- # cursive (7)
- # datavis (26)
- # datomic (5)
- # hoplon (2)
- # off-topic (3)
- # om (41)
- # portland-or (6)
- # random (1)
- # re-frame (11)
- # slack-help (3)
- # specter (1)
Hello. I’m trying to get my head around promise-chan
in clojurescript. I have the following code
(let [pch (promise-chan)]
(go
(<! pch)
(.log js/console "message a"))
(go
(<! pch)
(.log js/console "message b"))
(go
(>! pch true)))
I was expecting to receive both messages but i’m only getting “message a”. Am i missing something here?The intent is that you receive both
When you put to a promise-chan it should deliver to all pending takers
@mrmcc3: I'm assuming you're using the latest (0.2.374) ?
there are tests in the core.async cljs test suite very similar to this that pass