for (idx = 0; idx < num_threads; ++idx)
thread_index_array[idx] = curr_thread_list.GetThreadAtIndex(idx)->GetIndexID();
- bool still_should_stop = true;
+ // Use this to track whether we should continue from here. We will only continue the target running if
+ // no thread says we should stop. Of course if some thread's PerformAction actually sets the target running,
+ // then it doesn't matter what the other threads say...
+
+ bool still_should_stop = false;
for (idx = 0; idx < num_threads; ++idx)
{
SetRestarted (true);
break;
}
- else if (!stop_info_sp->ShouldStop(event_ptr))
- {
- still_should_stop = false;
- }
+
+ bool this_thread_wants_to_stop = stop_info_sp->ShouldStop(event_ptr);
+ if (still_should_stop == false)
+ still_should_stop = this_thread_wants_to_stop;
}
}