This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-14
Channels
- # announcements (13)
- # aws (2)
- # babashka (17)
- # beginners (80)
- # biff (10)
- # cljs-dev (51)
- # cljsrn (6)
- # clojure (42)
- # clojure-australia (9)
- # clojure-boston (2)
- # clojure-europe (17)
- # clojure-sweden (3)
- # clojure-uk (53)
- # clojurescript (44)
- # code-reviews (2)
- # core-async (5)
- # cryogen (3)
- # cursive (32)
- # datahike (1)
- # datomic (11)
- # events (1)
- # fulcro (22)
- # helix (3)
- # honeysql (3)
- # leiningen (4)
- # lsp (30)
- # luminus (13)
- # malli (5)
- # off-topic (115)
- # other-languages (5)
- # pathom (10)
- # polylith (23)
- # re-frame (24)
- # reagent (10)
- # releases (2)
- # shadow-cljs (124)
Hello! Very beginner core.async question. Shouldn't this code return the result of processing all go blocks asynchronously? When I run it in the REPL it only returns the result of processing one of the blocks at random
(async/<!!
(async/merge
(map #(go (let [channel (async/chan)]
(fetch_meo_data % channel)
(let [result (async/<! channel)]
(async/close! channel)
result)))
tv_channels)))
Thanks for the tip! Turns out I needed both. Merge joins all the channels and into collects them
(async/<!! (async/into '() (async/merge
(map
#(go (let
[channel (async/chan)
result (do
(fetch_meo_data % channel)
(handle-meo-response (async/<! channel)))]
(async/close! channel)
result))
tv_channels))))