Skip to content

Commit d75e6d9

Browse files
committed
Remove usage of _Py_yield.
1 parent 541169d commit d75e6d9

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

Include/internal/pycore_lock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ extern int _PyMutex_TryUnlock(PyMutex *m);
7272

7373
// Yield the processor to other threads (e.g., sched_yield).
7474
// Exported for _testembed.
75-
PyAPI_FUNC(void) _Py_yield(void);
75+
extern void _Py_yield(void);
7676

7777

7878
// PyEvent is a one-time event notification

Programs/_testembed.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2832,8 +2832,6 @@ stress_func(void *arg)
28322832

28332833
PyInterpreterGuard_Close(guard);
28342834

2835-
_Py_yield();
2836-
28372835
guard = PyInterpreterGuard_FromView(view);
28382836
PyInterpreterView_Close(view);
28392837

@@ -2868,7 +2866,6 @@ test_concurrent_finalization_stress(void)
28682866
}
28692867
}
28702868

2871-
_Py_yield();
28722869
Py_Finalize();
28732870

28742871
for (int i = 0; i < NUM_THREADS; ++i) {

0 commit comments

Comments
 (0)