Fork me on GitHub
#missionary
<
2022-07-11
>
Richie23:07:31

What does m/? mean when called on a continuous flow? When it's called on a discrete flow then it would park until there's a value. There's supposed to always be a value on a signal though, right? I noticed it https://github.com/hyperfiddle/photon/blob/fbf11927b4ab9f75a113c71d616a49dfcd2c9140/src/hyperfiddle/zero.cljc#L62.

👀 1
Dustin Getz00:07:36

the parameter here is meant to be a missionary discrete flow (lifted into photon) regardless, i did not know that m/? is defined on discrete flows, i thought it was task only, so i am confused by the linked snippet

Richie00:07:24

Oh right, sorry. Both >values and >control are discrete flows.

Richie00:07:36

Maybe flows satisfy the task interface. 🤷

A task is a 2-arity function taking a success continuation as first argument and a failure continuation as second argument. It must return a canceller, ... A call to a task function starts the execution of underlying operation, eventually calling one of the two continuations with a result.
A flow is a function provided by the producer taking two arguments, a notifier and a terminator. ... 
A notifier is a zero-argument function provided by the consumer. It is called by the producer each time it becomes ready to transfer a value ... 
A terminator is a zero-argument function provided by the consumer. It is called exactly once by the producer when the process instance has no more values to transfer and all of its resources have been released

leonoel06:07:15

m/? is undefined on flows, the argument is a task here

Richie10:07:55

Ah, ok, thanks.