Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
add Flow.lazyInit mirroring Sink.lazyInit #24427
Sink.lazyInit allows the construction of a Sink in response to the beginning of the stream. Flows can be constructed using the method as well by closing them for example with a Sink.actorRef and wiring that up in
An open question might be whether it is possible to switch out flows while the stream is running, similar to RxJava’s
What would be the preferred API? Do we need the Future Factory
or is the standard immediate factory enough?
The implementation might do the one with futures, whereas there would be an adapter with interface for immediate one just wrapping it in
The strong point for having the immediate API anyway is that in most usages the Flow has signature
I don't know though, if the 'future' version has any potential advantages over the 'immediate' one, as the
I also think that we can get close to the
@gosubpl I think it should be
Incidentally I was also looking for this feature the other day, for using in Artery. In other words I'm very interested in getting this done and looking forward to the PR.