mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-40234: Revert "bpo-37266: Daemon threads are now denied in subinterpreters (GH-14049)" (GH-19456)
This reverts commit 066e5b1a91
.
This commit is contained in:
parent
909b87d2bb
commit
14d5331eb5
7 changed files with 21 additions and 91 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue