Skip to content

Commit 78f26a1

Browse files
author
Luke Riddle
committed
Only skip redundant thread suspends when single notification is enabled
1 parent 9c83604 commit 78f26a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_pydevd_bundle/pydevd_thread_lifecycle.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ def pydevd_find_thread_by_id(thread_id):
2525
return None
2626

2727

28-
def mark_thread_suspended(thread, stop_reason: int, original_step_cmd: int = -1):
28+
def mark_thread_suspended(thread, stop_reason: int, original_step_cmd: int = -1, skip_unless_run_state: bool = False):
2929
info = set_additional_thread_info(thread)
30-
if info.pydev_state != STATE_RUN:
30+
if skip_unless_run_state and info.pydev_state != STATE_RUN:
3131
return info
3232
info.suspend_type = PYTHON_SUSPEND
3333
if original_step_cmd != -1:
@@ -93,7 +93,7 @@ def suspend_all_threads(py_db, except_thread):
9393
else:
9494
if t is except_thread:
9595
continue
96-
info = mark_thread_suspended(t, CMD_THREAD_SUSPEND)
96+
info = mark_thread_suspended(t, CMD_THREAD_SUSPEND, py_db.multi_threads_single_notification)
9797
if info.pydev_state != STATE_SUSPEND:
9898
continue
9999
frame = info.get_topmost_frame(t)

0 commit comments

Comments
 (0)