Skip to content

Make Fiber.with_error_handler deterministic #3439

@snowleopard

Description

@snowleopard

(Prompted by a discussion in #3430.)

Right now, Fiber.with_error_handler is not deterministic: it calls the handler on the earliest error. If there are multiple parallel branches, errors may race against each other, making debugging difficult.

It should be possible to make with_error_handler deterministic by calling the handler on the first error in the order of parallel branches. This may potentially be slower because we will now need to wait for all previous branches to complete successfully before reporting an error. Still, the resulting determinism seems to be worth the performance cost.

I've self-assigned to this issue, because I'd like to learn how Fiber works, but if anyone wants to make this happen earlier, feel free to take it over from me.

Metadata

Metadata

Assignees

Labels

proposalRFC's that are awaiting discussion to be accepted or rejected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions