mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
gh-115999: Add free-threaded specialization for SEND
(gh-127426)
No additional thread safety changes are required. Note that sending to a generator that is shared between threads is currently not safe in the free-threaded build.
This commit is contained in:
parent
13b68e1a61
commit
276cd66ccb
4 changed files with 50 additions and 15 deletions
4
Python/generated_cases.c.h
generated
4
Python/generated_cases.c.h
generated
|
@ -7065,7 +7065,7 @@
|
|||
receiver = stack_pointer[-2];
|
||||
uint16_t counter = read_u16(&this_instr[1].cache);
|
||||
(void)counter;
|
||||
#if ENABLE_SPECIALIZATION
|
||||
#if ENABLE_SPECIALIZATION_FT
|
||||
if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
|
||||
next_instr = this_instr;
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
|
@ -7075,7 +7075,7 @@
|
|||
}
|
||||
OPCODE_DEFERRED_INC(SEND);
|
||||
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
|
||||
#endif /* ENABLE_SPECIALIZATION */
|
||||
#endif /* ENABLE_SPECIALIZATION_FT */
|
||||
}
|
||||
// _SEND
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue