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
basically, enter the exit stack already in __aenter__(), and if all goes well, use the .pop_all() method to extract a new exit stack with all the callbacks for __aexit__() to unwind
this makes sure that the exit stack still unwinds even if there's an exception in __aenter__()
I use this technique everywhere when the logic of __aenter__() is nontrivial
if you don't do this, and __aenter__() raises an exception after you've entered a cancel scope, the entire task is broken beyond repair
``` (c) agronholm
The text was updated successfully, but these errors were encountered:
Use the following logic: https://github.com/agronholm/apscheduler/blob/master/src/apscheduler/_schedulers/async_.py#L159-L166
The text was updated successfully, but these errors were encountered: