diff options
author | Antoine Pitrou <pitrou@free.fr> | 2017-05-28 12:02:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-28 12:02:26 (GMT) |
commit | 4a8bcdf79cdb3684743fe1268de62ee88bada439 (patch) | |
tree | b2a35e7b3035cdaa5a8fe5bdcba81ca177d5686c /Python | |
parent | 0aa0a06e8b719533aefd175a5716f1698f474052 (diff) | |
download | cpython-4a8bcdf79cdb3684743fe1268de62ee88bada439.zip cpython-4a8bcdf79cdb3684743fe1268de62ee88bada439.tar.gz cpython-4a8bcdf79cdb3684743fe1268de62ee88bada439.tar.bz2 |
bpo-16500: Use register_at_fork() in the threading module (#1843)
* bpo-16500: Use register_at_fork() in the threading module
* Update comment at top of _after_fork()
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index b114b5b..6140815 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -240,8 +240,6 @@ PyEval_ReleaseThread(PyThreadState *tstate) void PyEval_ReInitThreads(void) { - _Py_IDENTIFIER(_after_fork); - PyObject *threading, *result; PyThreadState *current_tstate = PyThreadState_GET(); if (!gil_created()) @@ -251,22 +249,6 @@ PyEval_ReInitThreads(void) take_gil(current_tstate); main_thread = PyThread_get_thread_ident(); - /* Update the threading module with the new state. - */ - threading = PyMapping_GetItemString(current_tstate->interp->modules, - "threading"); - if (threading == NULL) { - /* threading not imported */ - PyErr_Clear(); - return; - } - result = _PyObject_CallMethodId(threading, &PyId__after_fork, NULL); - if (result == NULL) - PyErr_WriteUnraisable(threading); - else - Py_DECREF(result); - Py_DECREF(threading); - /* Destroy all threads except the current one */ _PyThreadState_DeleteExcept(current_tstate); } |