asap function

void asap(
  1. TaskCallback task
)

Executes or queues a task depending on the state of the scheduler (suspended or released)

Implementation

void asap(TaskCallback task) {
  _queue.add(task);

  if (_released) {
    _suspend();
    _flush();
  }
}