| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add a FRAME_SUSPENDED_YIELD_FROM_LOCKED state that acts as a brief lock, preventing other threads from transitioning the frame state while gen_getyieldfrom reads the yield-from object off the stack.
There was a problem hiding this comment.
LGTM. I worry a little about the increasing complexity in the state machine. Specifically, that folks might forget to call gen_yield_from_lock_wait() at the beginning of the state transition loop. Would it be worth factoring out the common logic?
Sorry, something went wrong.
|
Hmmm.. maybe we can handle it in _Py_GEN_TRY_SET_FRAME_STATE |
Sorry, something went wrong.
|
I've move the retry logic into _Py_GEN_TRY_SET_FRAME_STATE. @mpage would you please take a look at the most recent changes? |
Sorry, something went wrong.
There was a problem hiding this comment.
Nice!
Sorry, something went wrong.
python#144292) Add a FRAME_SUSPENDED_YIELD_FROM_LOCKED state that acts as a brief lock, preventing other threads from transitioning the frame state while gen_getyieldfrom reads the yield-from object off the stack.
| Back | FazBrowse Home | New Git URL |
Add a FRAME_SUSPENDED_YIELD_FROM_LOCKED state that acts as a brief lock, preventing other threads from transitioning the frame state while gen_getyieldfrom reads the yield-from object off the stack.