-
Notifications
You must be signed in to change notification settings - Fork 469
Make Fiber.with_error_handler deterministic #3439
Description
(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.