Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# It is required to debug threads started by start_new_thread in Python 3.4
_temp = threading.Thread()

if hasattr(_temp, "_os_thread_handle"): # Python 3.14 and later has this
def is_thread_alive(t):
return not t._os_thread_handle.is_done()

if hasattr(_temp, "_handle") and hasattr(_temp, "_started"): # Python 3.13 and later has this

def is_thread_alive(t):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from os.path import basename, splitext

from _pydev_bundle import pydev_log
from _pydev_bundle.pydev_is_thread_alive import is_thread_alive as pydevd_is_thread_alive
from _pydevd_bundle import pydevd_dont_trace
from _pydevd_bundle.pydevd_constants import (
IS_PY313_OR_GREATER,
Expand Down Expand Up @@ -267,7 +268,7 @@ def is_thread_alive(self):
if self._use_is_stopped:
return not self.thread._is_stopped
else:
return not self.thread._handle.is_done()
return pydevd_is_thread_alive(self.thread)


class _DeleteDummyThreadOnDel:
Expand Down
Loading
Loading