API Reference 0.3.24dart_web_toolkit_schedulerRescuer

Rescuer class

Keeps {@link Flusher} running.

class Rescuer implements RepeatingCommand {

 SchedulerImpl _schedulerImpl;

 Rescuer(this._schedulerImpl);

 bool execute() {
   if ( _schedulerImpl._flushRunning) {
     /*
      * Since JS is single-threaded, if we're here, then than means that
      * FLUSHER.execute() started, but did not finish. Reschedule FLUSHER.
      */
     _schedulerImpl.scheduleFixedDelay( _schedulerImpl.flusher, SchedulerImpl._FLUSHER_DELAY);
   }
   return  _schedulerImpl._shouldBeRunning;
 }
}

Implements

RepeatingCommand

Constructors

new Rescuer(SchedulerImpl _schedulerImpl) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
Rescuer(this._schedulerImpl);

Methods

bool execute() #

Returns true if the RepeatingCommand should be invoked again.

docs inherited from RepeatingCommand
bool execute() {
 if ( _schedulerImpl._flushRunning) {
   /*
    * Since JS is single-threaded, if we're here, then than means that
    * FLUSHER.execute() started, but did not finish. Reschedule FLUSHER.
    */
   _schedulerImpl.scheduleFixedDelay( _schedulerImpl.flusher, SchedulerImpl._FLUSHER_DELAY);
 }
 return  _schedulerImpl._shouldBeRunning;
}