mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-130794: Process interpreter QSBR queue in _PyMem_AbandonDelayed. (gh-130808)
This avoids a case where the interpreter's queue of memory to be freed could grow rapidly if there are many short lived threads.
This commit is contained in:
parent
cb67b44ca9
commit
2f6e0e9f70
3 changed files with 25 additions and 9 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