Flusher class
Calls {@link SchedulerImpl#flushPostEventPumpCommands()}.
class Flusher implements RepeatingCommand {
SchedulerImpl _schedulerImpl;
Flusher(this._schedulerImpl);
bool execute() {
_schedulerImpl._flushRunning = true;
_schedulerImpl.flushPostEventPumpCommands();
/*
* No finally here, we want this to be clear only on a normal exit. An
* abnormal exit would indicate that an exception isn't being caught
* correctly or that a slow script warning canceled the timer.
*/
_schedulerImpl._flushRunning = false;
return _schedulerImpl._shouldBeRunning = _schedulerImpl.isWorkQueued();
}
}
Implements
Constructors
new Flusher(SchedulerImpl _schedulerImpl) #
Methods
bool execute() #
Returns true if the RepeatingCommand should be invoked again.
docs inherited from RepeatingCommand
bool execute() {
_schedulerImpl._flushRunning = true;
_schedulerImpl.flushPostEventPumpCommands();
/*
* No finally here, we want this to be clear only on a normal exit. An
* abnormal exit would indicate that an exception isn't being caught
* correctly or that a slow script warning canceled the timer.
*/
_schedulerImpl._flushRunning = false;
return _schedulerImpl._shouldBeRunning = _schedulerImpl.isWorkQueued();
}