mirror of
https://github.com/python/cpython.git
synced 2025-08-29 05:05:03 +00:00
[3.13] gh-130794: Process interpreter QSBR queue in _PyMem_AbandonDelayed. (gh-130808) (#130857)
This avoids a case where the interpreter's queue of memory to be freed
could grow rapidly if there are many short lived threads.
(cherry picked from commit 2f6e0e9f70
)
This commit is contained in:
parent
22d729cf5d
commit
07522755ae
3 changed files with 23 additions and 8 deletions
|
@ -161,6 +161,7 @@ bool
|
|||
_Py_qsbr_poll(struct _qsbr_thread_state *qsbr, uint64_t goal)
|
||||
{
|
||||
assert(_Py_atomic_load_int_relaxed(&_PyThreadState_GET()->state) == _Py_THREAD_ATTACHED);
|
||||
assert(((_PyThreadStateImpl *)_PyThreadState_GET())->qsbr == qsbr);
|
||||
|
||||
if (_Py_qbsr_goal_reached(qsbr, goal)) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue