-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add switch/switchMap #114
Comments
Sounds interesting, I like the name I think it may even be useful enough that it should be a part of Akka Streams core, and implemented as a custom stage rather than composed. WDYT? |
@johanandren Sorry for the late response—Google Inbox has been playing tricks on me again. I agree this would be sufficiently useful to justify including in the core library—I chose to implement it partly because it is a "core" Rx combinator (and partly to see if I can get anywhere using non-trivial composition over the flow DSL, where Monix and FS2 have a small advantage due to abundance of combinators). If you think this issue should be migrated to the core library, I'd be happy to reimplement and contribute it as a custom stage. Should I open an issue there? Naming: |
Yeah, please open a ticket in core Akka and give it a try, thanks! |
the
switch
andswitchMap
operators, as described in Rx (and also implemented in Monix), are very useful.For anyone not familiar with it,
switch
operates over a stream of streams, always emitting from the latest stream, discarding older streams left behind.See here for a quick standalone implementation and example.
The text was updated successfully, but these errors were encountered: