mirror of
https://github.com/python/cpython.git
synced 2026-04-28 14:50:59 +00:00
gh-120321: Make gi_yieldfrom thread-safe in free-threading build (#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.
This commit is contained in:
parent
a7048327ed
commit
a01694dacd
9 changed files with 103 additions and 19 deletions
|
|
@ -40,7 +40,7 @@ struct mutex_entry {
|
|||
int handed_off;
|
||||
};
|
||||
|
||||
static void
|
||||
void
|
||||
_Py_yield(void)
|
||||
{
|
||||
#ifdef MS_WINDOWS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue