summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
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 /Lib/threading.py
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 'Lib/threading.py')
-rw-r--r--Lib/threading.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index 5424db3..ab29db7 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -35,7 +35,6 @@ _start_new_thread = _thread.start_new_thread
_allocate_lock = _thread.allocate_lock
_set_sentinel = _thread._set_sentinel
get_ident = _thread.get_ident
-_is_main_interpreter = _thread._is_main_interpreter
try:
get_native_id = _thread.get_native_id
_HAVE_THREAD_NATIVE_ID = True
@@ -865,10 +864,6 @@ class Thread:
if self._started.is_set():
raise RuntimeError("threads can only be started once")
- if self.daemon and not _is_main_interpreter():
- raise RuntimeError("daemon thread are not supported "
- "in subinterpreters")
-
with _active_limbo_lock:
_limbo[self] = self
try: