2 ms·
Indeed, this has been solved in Swift with ReactiveCocoa 3. SignalProducer<Value, Error> is a cold signal that must be started/observed to take effect. Signal<V
by xenadu02 10y ago
Indeed, this has been solved in Swift with ReactiveCocoa 3. SignalProducer<Value, Error> is a cold signal that must be started/observed to take effect. Signal<Value, Error> is hot. We have the lift operator that can transform any signal operator into a signal producer operator so you don't have to duplicate everything.
If anyone is wondering:
Cold signals don't do work until you ask for it; think starting a new network request. They don't send any values until someone starts them.
Hot signals send values at their own leisure and often represent things out of your control, like button taps or receiving a push notification. They send values whether anyone is listening or not.