summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-12 21:45:09 (GMT)
committerGitHub <noreply@github.com>2020-04-12 21:45:09 (GMT)
commit14d5331eb5e6c38be12bad421bd59ad0fac9e448 (patch)
tree4f9c3351cc8f6cb2fa397b56a4a6c37c547cef87 /Modules
parent909b87d2bb3d6330d39c48e43f7f50f4d086cc41 (diff)
downloadcpython-14d5331eb5e6c38be12bad421bd59ad0fac9e448.zip
cpython-14d5331eb5e6c38be12bad421bd59ad0fac9e448.tar.gz
cpython-14d5331eb5e6c38be12bad421bd59ad0fac9e448.tar.bz2
bpo-40234: Revert "bpo-37266: Daemon threads are now denied in subinterpreters (GH-14049)" (GH-19456)
This reverts commit 066e5b1a917ec2134e8997d2cadd815724314252.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_threadmodule.c24
-rw-r--r--Modules/clinic/_threadmodule.c.h22
2 files changed, 0 insertions, 46 deletions
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
index addef3e..e2bb14e 100644
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -8,14 +8,6 @@
#include "structmember.h" /* offsetof */
#include "pythread.h"
-#include "clinic/_threadmodule.c.h"
-
-/*[clinic input]
-module _thread
-[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=be8dbe5cc4b16df7]*/
-
-
static PyObject *ThreadError;
static PyObject *str_dict;
@@ -1493,21 +1485,6 @@ PyDoc_STRVAR(excepthook_doc,
\n\
Handle uncaught Thread.run() exception.");
-/*[clinic input]
-_thread._is_main_interpreter
-
-Return True if the current interpreter is the main Python interpreter.
-[clinic start generated code]*/
-
-static PyObject *
-_thread__is_main_interpreter_impl(PyObject *module)
-/*[clinic end generated code: output=7dd82e1728339adc input=cc1eb00fd4598915]*/
-{
- PyThreadState *tstate = _PyThreadState_GET();
- int is_main = _Py_IsMainInterpreter(tstate);
- return PyBool_FromLong(is_main);
-}
-
static PyMethodDef thread_methods[] = {
{"start_new_thread", (PyCFunction)thread_PyThread_start_new_thread,
METH_VARARGS, start_new_doc},
@@ -1537,7 +1514,6 @@ static PyMethodDef thread_methods[] = {
METH_NOARGS, _set_sentinel_doc},
{"_excepthook", thread_excepthook,
METH_O, excepthook_doc},
- _THREAD__IS_MAIN_INTERPRETER_METHODDEF
{NULL, NULL} /* sentinel */
};
diff --git a/Modules/clinic/_threadmodule.c.h b/Modules/clinic/_threadmodule.c.h
deleted file mode 100644
index 07ea08b..0000000
--- a/Modules/clinic/_threadmodule.c.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*[clinic input]
-preserve
-[clinic start generated code]*/
-
-PyDoc_STRVAR(_thread__is_main_interpreter__doc__,
-"_is_main_interpreter($module, /)\n"
-"--\n"
-"\n"
-"Return True if the current interpreter is the main Python interpreter.");
-
-#define _THREAD__IS_MAIN_INTERPRETER_METHODDEF \
- {"_is_main_interpreter", (PyCFunction)_thread__is_main_interpreter, METH_NOARGS, _thread__is_main_interpreter__doc__},
-
-static PyObject *
-_thread__is_main_interpreter_impl(PyObject *module);
-
-static PyObject *
-_thread__is_main_interpreter(PyObject *module, PyObject *Py_UNUSED(ignored))
-{
- return _thread__is_main_interpreter_impl(module);
-}
-/*[clinic end generated code: output=505840d1b9101789 input=a9049054013a1b77]*/