close method

Future<bool> close()

Closes this executor.

Implementation

Future<bool> close() async {
  if (_closed) return true;

  if (_closing != null) {
    return _closing!.future;
  }

  var closing = _closing = Completer<bool>();

  await _executorThread.close();

  _closed = true;
  closing.complete(true);

  return closing.future;
}