Closed lgrapenthin closed 3 years ago
What would it look like ?
Something like (m/mult f)
produces a mult, and (m/tap m)
returns a flow from the mult. f
would be started only once for as long as there are parallel taps.
reactor
is supposed to cover this. Inside a reactor context (i.e in the boot code or in reaction to an event), you can assign an identity to a flow with stream!
or signal!
(resp. for discrete and continuous flows). These functions return another flow subscribing to this identity. stream!
will collect the backpressure of its subscribers before propagating it upstream so it's very close to core.async
's mult
/tap
.
It's currently super badly documented, but have a look at #11, and if you can provide a more precise use case I'm happy to help.
Alright, thanks. Thats very useful. Also the mbx->flow conversion part of the example was an eye-opener.
Considering that flows can spawn expensive processes like subscribing to external APIs, it would be useful to be able to multiplex a flow.