I have a continuous
parent signal that I derive various other signals from. Most of the subscribers are fine with the “continuous” semantics, meaning they do want to receive the last value upon subscribing. But with some subscribers I just want to receive the future values, no initial ones. Example:
import CwlSignal
let (input, signal) = Signal<Int>.create { s in s.continuous() }
input.send(value: 1)
input.send(value: 2)
let e1 = signal.subscribeValues { val in
print("A: \(val)")
}
let e2 = signal.subscribeValues { val in
print("B: \(val)")
}
input.send(value: 3)
input.close()
This prints:
A: 2
B: 2
A: 3
B: 3
Now I would like the second subscription not to receive the initial value, ie. the output should look like this:
A: 2
A: 3
B: 3
Is it possible to get that kind of behaviour without tweaking the parent signal?