[mvc-works/chan-utils "0.1.0"]
chan-utils.core/chan-once is a macro for creating a channel.(chan-once cb-name body)
cb-name is the new variable for callback. For example, use got as the name:
(go
(let [data (<! (chan-once got
(js/setTimeout
(fn [] (got 1)) 4000)))]
(println "data" data)))
chan-utils.core/all-once is a function gathering a list of channels, and return values in a list after all of them finished.(cumulo-util.async/all-once get-chan [1 2 3 4]) ; like Promise.all
MIT
Can you improve this documentation? These fine people already did:
jiyinyiyong & ChenYongEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |