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
Ensure AsyncContext is correctly exited when a for-await loop is abruptly exited (via break or continue).
The simple solution is to just move the context swap at the end of the loop body into a `finally` block, so that it runs even if the loop exits via a different code path. Note that if the abrupt exit is a `return`, then swap runs twice, but this is okay since the exit operation is idempotent.
PiperOrigin-RevId: 715856725
0 commit comments