You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How should fail_at & fail_after handle MultiErrors? #59
Suppose that something like MultiError([KeyError(), Cancelled()]) arrives at a with fail_after(...). Right now the Cancelled is absorbed, and then the KeyError continues propagating, because fail_after only raises TooSlowError if the block exits without any exception.
An alternative that might make more sense is to use a MultiError.catch to replace each Cancelled with a TooSlowError. The tricky bit is that right now, the abstraction boundaries don't really give fail_after a way to do this -- the MultiError.catch is hidden inside the cancel scope.
One option would be to move this functionality into open_cancel_scope itself. Another would be to make the Cancelled._scope attribute public, allowing an implementation like:
(The other advantage of this is that it would preserve the traceback of the Cancelled error, which currently gets lost. This is useful to see what operation froze.)
Activity