stopEvent(this, false, StopPriority),
scMain(nullptr),
starvationEvent(this, false, StarvationPriority),
- _started(false), _paused(false), _stopped(false),
+ _started(false), _paused(false), _stopped(false), _stopNow(false),
maxTickEvent(this, false, MaxTickPriority),
_numCycles(0), _changeStamp(0), _current(nullptr), initDone(false),
runOnce(false)
void
Scheduler::ready(Process *p)
{
+ if (_stopNow)
+ return;
+
// Clump methods together to minimize context switching.
static bool cluster_methods = false;
_changeStamp++;
}
+ if (_stopNow)
+ return;
+
// The update phase.
update();
return;
if (!finish_delta) {
+ _stopNow = true;
// If we're not supposed to finish the delta cycle, flush all
// pending activity.
clear();