activate method

void activate()

Call the function. If the function is already running, this is a no-op.

Implementation

void activate() async {
  if (_isRunning) return;
  _isRunning = true;
  try {
    await _fn();
  } finally {
    _isRunning = false;
  }
}