void SuspendUserThreads(ThreadingModel model, SingleSteppingEngine caller)
{
Report.Debug (DebugFlags.Threads,
"Suspending user threads: {0} {1}", model, caller);
foreach (SingleSteppingEngine engine in thread_hash.Values) {
Report.Debug (DebugFlags.Threads, " check user thread: {0} {1}",
engine, engine.Thread.ThreadFlags);
if (engine == caller)
continue;
if (((engine.Thread.ThreadFlags & Thread.Flags.Immutable) != 0) &&
((model & ThreadingModel.StopImmutableThreads) == 0))
continue;
if (((engine.Thread.ThreadFlags & Thread.Flags.Daemon) != 0) &&
((model & ThreadingModel.StopDaemonThreads) == 0))
continue;
engine.SuspendUserThread ();
}
Report.Debug (DebugFlags.Threads,
"Done suspending user threads: {0} {1}", model, caller);
}