-
-
Save jasdev/fafd68b75bc85a5b1011d979f8821c25 to your computer and use it in GitHub Desktop.
`Publisher.cher` without `autoconnect`ing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Publisher { | |
func cher() -> Publishers.Multicast<Self, PassthroughSubject<Output, Failure>> { | |
multicast(PassthroughSubject.init) /// (1) Keen readers might be asking why we didn’t reach for | |
/// `CurrentValueSubject` here. The reason is two-fold, we’d then need to consider what its initial value | |
/// would be, and that’d do more than the plain ol’ `share` operator in that it’d _replay_ values to future | |
/// subscribers (before any completions), which, is what we’ll tackle soon! | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment