bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-12360)

This is effectively an un-revert of #11617 and #12024 (reverted in #12159). Portions of those were merged in other PRs (with lower risk) and this represents the remainder. Note that I found 3 different bugs in the original PRs and have fixed them here.
This commit is contained in:
Eric Snow 2019-04-12 09:18:16 -06:00 committed by GitHub
parent 44235041f3
commit f13c5c8b94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 151 additions and 108 deletions

View file

@ -373,7 +373,7 @@ class TestPendingCalls(unittest.TestCase):
def test_pendingcalls_threaded(self):
#do every callback on a separate thread
n = 32 #total callbacks
n = 32 #total callbacks (see NPENDINGCALLS in pycore_ceval.h)
threads = []
class foo(object):pass
context = foo()