This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-31
Channels
- # adventofcode (4)
- # ai (1)
- # announcements (13)
- # babashka (1)
- # beginners (42)
- # calva (15)
- # chlorine-clover (28)
- # cider (7)
- # cljsrn (1)
- # clojure (3)
- # clojure-china (1)
- # clojure-dev (4)
- # clojure-europe (7)
- # clojure-losangeles (1)
- # clojure-nl (3)
- # clojure-nlp (2)
- # clojure-sweden (12)
- # clojure-uk (2)
- # clojurescript (30)
- # code-reviews (36)
- # core-async (5)
- # cursive (10)
- # data-science (1)
- # datalevin (1)
- # fulcro (11)
- # introduce-yourself (1)
- # lsp (10)
- # malli (7)
- # minecraft (24)
- # missionary (10)
- # monads (6)
- # nrepl (4)
- # off-topic (11)
- # portal (4)
- # rdf (1)
- # reagent (3)
- # releases (4)
- # shadow-cljs (4)
- # spacemacs (4)
are there any docs on how missionary schedules work to be done? specifically interested in CLJS, but also in how the differences between CLJS and CLJ are managed
I think this is mostly the domain of https://github.com/leonoel/missionary/blob/master/src/missionary/impl/Reactor.cljs but the lingo isn't something I'm familiar with yet
> are there any docs on how missionary schedules work to be done?
Still mostly in my head, but the main rule is : the work is done when it can be done, by the thread that made the work doable
> how the differences between CLJS and CLJ are managed
There shouldn't be any difference in practice, cljs is a special case of clj
> I think this is mostly the domain of https://github.com/leonoel/missionary/blob/master/src/missionary/impl/Reactor.cljs
This text block describes the implementation of stream!
and signal!
only
LMK if you have more specific questions
sure, let me throw out a few questions at top of mind:
when an event is received (e.g. a watch
sees a new value in an atom), when and where does calculation of the flow graph begin? immediately, or is it queued?
when calculating a graph of flows, does it park/pause the calculation or run the entire graph until stabilization synchronously? is the work split up across "process" boundaries? I'm still working on the lingo to know exactly what creates a new process.
it's a bit hard for me to untangle the "where" since CLJS has a single thread, whereas I'm guessing you take advantage of multiple threads on the JVM 😄
> when an event is received (e.g. a watch
sees a new value in an atom), when and where does calculation of the flow graph begin? immediately, or is it queued?
immediately
> when calculating a graph of flows, does it park/pause the calculation or run the entire graph until stabilization synchronously?
propagation though the graph happens synchronously, stabilization is reached when no more flows are ready to transfer
> is the work split up across "process" boundaries?
not sure to understand the question
> what creates a new process
it depends on the operator. some of them just build a static pipeline stage on boot (e.g latest
), some are more dynamic and can spawn multiple child processes over their lifecycle (e.g ap
)
> I'm guessing you take advantage of multiple threads on the JVM
Apart from the sleep
scheduler, there's no hidden thread. If you want multithreading, you have to be explicit about it, and specify the threadpool with via
. cpu
and blk
are provided for convenience but they're not mandatory and not used internally.
thanks, that answers a lot!
> > is the work split up across "process" boundaries?
> not sure to understand the question
I was thinking about how core.async go
blocks will park the computation on the thread it's running on at channel boundaries, so you can effectively time slice a computation by using e.g. a go-loop
. it sounds like missionary doesn't make that kind of scheduling choice for you