I have two RACSignal
s one of which is a timer and the other one indicates there's work to do. Since the work indication is sometimes unreliable, there's the timer, which takes care that work will be done periodically if the precise notifications don't work.
The general setup is:
RACSignal *signal = [RACSignal merge:@[
[[RACSignal interval:0.5 onScheduler:[RACScheduler scheduler]]
filter:^BOOL(__unused id _x) {
return isThereAProblemInDeliveringWork();
}],
incomingWorkSubject
]];
Now I want signal
to complete as soon as incomingWorkSubject
was completed. So, in general: Complete the merged signal as soon as any of its input signals completed. Unfortunately, [RACSignal merge:...]
doesn't do what I want and apparently waits for all incoming signals to complete.
What would be the ReactiveCocoa-way of achieving that?