monifu.reactive.observers
A safe observer ensures too things:
- errors triggered by downstream observers are caught and streamed to onError, while the upstream gets an Ack.Cancel, to stop sending events
onError
Ack.Cancel
- once an onError or onComplete was emitted, the observer no longer accepts onNext events, ensuring that the Rx grammar is respected.
onComplete
onNext
- if downstream signals a Cancel, the observer no longer accepts any events, ensuring that the Rx grammar is respected.
Cancel
This implementation doesn't address multi-threading concerns in any way.
A safe observer ensures too things:
- errors triggered by downstream observers are caught and streamed to
onError
, while the upstream gets anAck.Cancel
, to stop sending events- once an
onError
oronComplete
was emitted, the observer no longer acceptsonNext
events, ensuring that the Rx grammar is respected.- if downstream signals a
Cancel
, the observer no longer accepts any events, ensuring that the Rx grammar is respected.This implementation doesn't address multi-threading concerns in any way.