ensureStarted method

  1. @override
void ensureStarted()
override

Called just before processing a WorkerRequest. The onTimeout callback may not be null, and a timer will be started that will automatically cancel this token if processing takes longer than duration.

Implementation

@override
void ensureStarted() => _timer ??= Timer(duration, () {
      super
          .cancel(TaskTimeoutException(message: message, duration: duration));
    });