8000 bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). by ericsnowcurrently · Pull Request #12360 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix the pending-for-other-thread case.
  • Loading branch information
ericsnowcurrently committed Apr 5, 2019
commit e356cad82502cb0bf5b90c5802ea0ca0d31cd8f7
2 changes: 1 addition & 1 deletion Lib/test/test_capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def pendingcalls_wait(self, l, n, context = None):
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()
Expand Down
2 changes: 1 addition & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ make_pending_calls(PyInterpreterState *interp)
// Thread mismatch, so move it to the end of the list
// and start over.
_Py_AddPendingCall(interp, thread_id, func, arg);
return 0;
goto error;
}

/* having released the lock, perform the callback */
Expand Down
0