8000 gh-104341: Fix threading Module Shutdown by ericsnowcurrently · Pull Request #104560 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104341: Fix threading Module Shutdown #104560

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix Windows.
  • Loading branch information
ericsnowcurrently committed May 16, 2023
commit c7a832bb5b24ba4203647cdb436268754553bc2d
6 changes: 3 additions & 3 deletions Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,6 @@ PyDoc_STRVAR(excepthook_doc,
\n\
Handle uncaught Thread.run() exception.");

#ifdef HAVE_FORK
static PyObject *
thread__wait_for_threads_fini(PyObject *module, PyObject *Py_UNUSED(ignored))
{
Expand All @@ -1828,6 +1827,7 @@ thread__wait_for_threads_fini(PyObject *module, PyObject *Py_UNUSED(ignored))
Py_RETURN_NONE;
}

#ifdef HAVE_FORK
static PyObject *
thread__after_fork(PyObject *module, PyObject *Py_UNUSED(ignored))
{
Expand Down Expand Up @@ -1870,10 +1870,10 @@ static PyMethodDef thread_methods[] = {
METH_NOARGS, _set_sentinel_doc},
{"_excepthook", thread_excepthook,
METH_O, excepthook_doc},
{"_wait_for_threads_fini", (PyCFunction)thread__wait_for_threads_fini,
{"_wait_for_threads_fini", thread__wait_for_threads_fini,
METH_NOARGS, NULL},
#ifdef HAVE_FORK
{"_after_fork", (PyCFunction)thread__after_fork,
{"_after_fork", thread__after_fork,
METH_NOARGS, NULL},
#endif
{NULL, NULL} /* sentinel */
Expand Down
0