简体   繁体   中英

RacSignal disposed automatically

I have merged some racsignals into a single Racsignal. And subscribed the merged signal. Now if any of the signals that i have merged sends error event all the merged signals are disposed. I want all the signals to continue there executing if any signal has failed.

I can suggest two options:

  1. Apply catchTo:[RACSignal empty] to each signal to squelch any signal that errors.
  2. Apply -materialize to each signal which changes all subscriber events into concrete instances of RACEvent .

Using option #1 drops the error objects and prevents the other merged signals from being disposed, but leaves the subscriber uninformed about all errors.

Using option #2 means your subscriber has to unwrap the RACEvent and then conditionally perform the value or error handling logic, inside the next block.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM