This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-16
Channels
- # babashka (48)
- # beginners (44)
- # biff (3)
- # calva (1)
- # cider (42)
- # clj-kondo (8)
- # clojure (93)
- # clojure-australia (2)
- # clojure-europe (3)
- # clojure-taiwan (1)
- # clojurescript (10)
- # conjure (4)
- # deps-new (5)
- # joker (9)
- # lsp (12)
- # membrane (16)
- # minecraft (12)
- # missionary (4)
- # mount (3)
- # off-topic (60)
- # reitit (9)
- # releases (13)
- # ring-swagger (1)
- # shadow-cljs (18)
- # sql (67)
- # tools-deps (2)
(let [sem (m/sem 2)]
(m/ap
(let [batch (m/?= (->> (fetch-ids)
(m/eduction (partition-all 20))))]
(m/holding sem (->> (fetch-projects batch)
(m/reduce conj [])
m/?)))))
Would that be the way to go to run 2 request (fetch-projects) in parallel ?
I first fetch all ids then group them by 20 and fire the request in parallel but max 2 at a time.👍 1
https://gist.github.com/leonoel/4b7e8c26ffdbfb4e4ffcb79aaf9dccfa This approach may be a better fit, backpressure is propagated from downstream to parallel processors and from parallel processors to upstream
https://gist.github.com/leonoel/4b7e8c26ffdbfb4e4ffcb79aaf9dccfa This approach may be a better fit, backpressure is propagated from downstream to parallel processors and from parallel processors to upstream