Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
wild goose chase... compare before and after ident
  • Loading branch information
gpshead committed Apr 18, 2022
commit ba7512233eee962a9bba7852cbef246fed5778c9
7 changes: 4 additions & 3 deletions Lib/test/support/threading_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@


def threading_setup():
return _thread._count(), threading._dangling.copy()
return _thread._count(), threading._dangling.copy(), threading.get_ident()


def threading_cleanup(*original_values):
_MAX_COUNT = 100

for count in range(_MAX_COUNT):
values = _thread._count(), threading._dangling
values = _thread._count(), threading._dangling, threading.get_ident()
if values == original_values:
break

Expand All @@ -39,7 +39,8 @@ def threading_cleanup(*original_values):
support.print_warning(f"threading_cleanup() failed to cleanup "
f"{values[0] - original_values[0]} threads "
f"(count: {values[0]}, "
f"dangling: {len(dangling_threads)})")
f"dangling: {len(dangling_threads)}), ")
f"ident before {values[2]} ident after {values[2]})")
for thread in dangling_threads:
support.print_warning(f"Dangling thread: {thread!r}")

Expand Down