This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-29
Channels
- # announcements (1)
- # biff (5)
- # calva (10)
- # cljdoc (4)
- # clojure (17)
- # clojure-europe (15)
- # clojure-norway (38)
- # clojurescript (53)
- # community-development (1)
- # cursive (2)
- # datomic (14)
- # fulcro (11)
- # funcool (1)
- # hyperfiddle (7)
- # introduce-yourself (2)
- # jobs-discuss (17)
- # missionary (7)
- # releases (4)
- # shadow-cljs (30)
- # slack-help (6)
- # specter (5)
- # squint (22)
Hi guys! What is the convention to adopt in the codebase with a lot of missionary task? For example consider the following example:
;; Let the caller apply the missionary wrapper
(defn function-1 [] ...)
(def main
(m/sp
(let [res-1 (m/? (m/sp (function-1)))]
;; Or provide extra function to do the job
(defn function-1 [] ...)
(defn ?function-1 [] (m/? (m/sp (function-1)))
(def main
(m/sp
(let [res-1 (?function-1)])
Let the caller choose. It's always possible to turn an asynchronous task into a synchronous one but the opposite is not true, so async should be the default
👍 2
From the documentation, it looks like there isn't a way to terminate the flow created by observe
? The flow can be cancelled of course, but there isn't a way to have it act like e.g. (seed [1 2 3])
, i.e. output some values and then terminate without cancellation? (It's fine if not, there's other ways to do it of course, just wanted to check my understanding).