You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently started to convert from RAC 3 to RAC 4 and found out that takeUntil on SignalProducer now accepts SignalProducer as opposed to Signal in RAC 3.
This is my current method in extension SignalType and it feels pretty hackish:
func toSignalProducer() -> SignalProducer<T, E> {
return SignalProducer { (sink, _) in
self.observe(
next: { t in sendNext(sink, t) },
completed: { _ in sendCompleted(sink) }
)
}
}
Can I improve this? Thanks!
The text was updated successfully, but these errors were encountered:
@ikesyo Just for curiosity, is my approach of converting Signal to SignalProducer sub-optimal? Can this be done better? I see most interoperability between Signal and SignalProducer comes by lifting Signal's operators to accept SignalProducer (and rightly so). Is converting Signal to SignalProducer frowned upon?
I've recently started to convert from RAC 3 to RAC 4 and found out that
takeUntil
onSignalProducer
now acceptsSignalProducer
as opposed toSignal
in RAC 3.This is my current method in
extension SignalType
and it feels pretty hackish:Can I improve this? Thanks!
The text was updated successfully, but these errors were encountered: