File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -36,16 +36,23 @@ def threading_cleanup(*original_values):
36
36
if not count :
37
37
# Display a warning at the first iteration
38
38
support .environment_altered = True
39
- dangling_threads = values [1 ]
39
+
40
+ # Copy the thread list to get a consistent output between the
41
+ # warning and the "Dangling thread" listing.
42
+ dangling_threads = list (values [1 ])
43
+
40
44
support .print_warning (f"threading_cleanup() failed to cleanup "
41
45
f"{ values [0 ] - original_values [0 ]} threads "
42
46
f"(count: { values [0 ]} , "
43
47
f"dangling: { len (dangling_threads )} )" )
44
48
for thread in dangling_threads :
45
49
support .print_warning (f"Dangling thread: { thread !r} " )
50
+ breakpoint ()
46
51
47
- # Don't hold references to threads
52
+ # Break any potential reference cycle
48
53
dangling_threads = None
54
+
55
+ # Break any potential reference cycle
49
56
values = None
50
57
51
58
time .sleep (0.01 )
You can’t perform that action at this time.
0 commit comments