Skip to content

observeOn schedules onError ... should it jump the line? #1680

@benjchristensen

Description

@benjchristensen

onError events are put on the queue so they get emitted on the scheduled thread ... but they are at the end of the onNext events. Should they instead "jump the line"?

I think yes as an onError is supposed to act like throwing an exception which unravels the stack immediately and discards all state, including data in queues.

This is based on Rx Design Guideline 6.6:

6.6. OnError messages should have abort semantics
As normal control flow in .NET uses abort semantics for exceptions (the stack is unwound, current code path is interrupted), Rx mimics this behavior. To ensure this behavior, no messages should be sent out by an operator once one of it sources has an error message or an exception is thrown within the operator.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions