Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
When instrumenting regularfor loops, we instrument theFOR_ITER instruction as theLEFT branch and thePOP_ITER instruction as theRIGHT branch.
This doesn't work forasync for as it uses exceptions to exit the loop.
Raising an exception is the documented behavior for exiting a [async] generator, so we will still need to generate an event for the exception being raised, much as we do inINSTRUMENTED_END_FOR as well as theBRANCH events.