@@ -22,25 +22,25 @@ def test_actor_unprioritised_jobs(self):
22
22
"""Verify that an actor exposes its unprioritised jobs (queue)."""
23
23
self .build ()
24
24
_ , process , thread , _ = lldbutil .run_to_source_breakpoint (
25
- self ,
26
- "break here" ,
27
- lldb .SBFileSpec ("main.swift" ),
28
- only_one_thread = False ,
25
+ self , "break here" , lldb .SBFileSpec ("main.swift" )
29
26
)
30
27
31
- stopped_threads = [
32
- t for t in process .threads if t .stop_reason == lldb .eStopReasonBreakpoint
33
- ]
34
-
35
- # If only one breakpoint has hit, run the other threads to reach the
36
- # state where both breakpoints have hit.
37
- if len (stopped_threads ) == 1 :
38
- with _managed_async (self .dbg ):
39
- # Suspend the current thread.
40
- thread .Suspend ()
41
- # Run the other threads until the second breakpoint hits.
42
- self .dbg .SetAsync (False )
43
- process .Continue ()
28
+ with _managed_async (self .dbg ):
29
+ # Suspend the current thread.
30
+ thread .Suspend ()
31
+ # Continue - other threads only.
32
+ self .dbg .SetAsync (True )
33
+ process .Continue ()
34
+ # Wait - allowing other threads to run.
35
+ time .sleep (5 )
36
+ # Stop the threads.
37
+ self .dbg .SetAsync (False )
38
+ self .dbg .HandleCommand ("process interrupt" )
39
+ # Note: After a single interrupt, lldb reports the process as
40
+ # running, but two interrupt calls results in a stopped process.
41
+ # Also, using `process.Stop()` instead of `"process interrupt"`
42
+ # did not work.
43
+ self .dbg .HandleCommand ("process interrupt" )
44
44
45
45
# Get the frame for the the breakpoint hit in `main()`.
46
46
frame = lldb .SBFrame ()
0 commit comments