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:
Sam Gross 2026-01-30 12:20:27 -05:00 committed by GitHub
parent a7048327ed
commit a01694dacd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 103 additions and 19 deletions

View file

@ -40,7 +40,7 @@ struct mutex_entry {
int handed_off;
};
static void
void
_Py_yield(void)
{
#ifdef MS_WINDOWS