Closed Voxar closed 5 years ago
I like it ! Will gladly take a PR even though I’d argue this can even be in the main repo possibly :)
-- Shai Mishali
On October 19, 2018 at 14:01:49, Patrik Sjöberg (notifications@github.com) wrote:
Hello. I have a suggestion for added overloads to the takeUntil operator
/// take until completable completes or errors outtakeUntil(: Completable)/// Like RxSwift.takeUntil(: Observable) but until other completes./// Convenience for
takeUntil(other.ignoreElements())
takeUntil(completed: Observable)Example usage
let connection = network.connect(to: host).share()let heartbeat = connection.flatMapLatest { Observable
.interval(10.0, MainScheduler.instance) .takeUntil(completed: connection)} .withLatestFrom(connection) .flatMapLatest(sendHeartbeat) .subscribe() } — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RxSwiftCommunity/RxSwiftExt/issues/187, or mute the thread https://github.com/notifications/unsubscribe-auth/AAk7lMLau0fBm-qRi3XqKq5UH8MFttYfks5umbEdgaJpZM4XwJJs .
Opened pr to main repo here - https://github.com/ReactiveX/RxSwift/pull/1971 @Voxar approved that I can proceed with his idea
@freak4pc what do u think about it? Main won't accept it, should I open PR here? It there any sense in this operator? Overwise, should we close this one?
I wanted to use it to begin with but given the discussion that emerged, I think it would cause too much confusion. For a completion it fits more with concat than a takeUntil. Closing for now.
Hello. I have a suggestion for added overloads to the
takeUntil
operatorExample usage
Possible implementation at https://github.com/RxSwiftCommunity/RxSwiftExt/compare/master...Voxar:takeUntilCompleted?expand=1