cancel method

bool cancel(
  1. int asyncId
)

取消任务,无法取消正在执行的任务

Implementation

bool cancel(int asyncId) {
  if (_isolateConfiguration.any((element) => element.id == asyncId)) {
    _isolateConfiguration.removeWhere((element) => element.id == asyncId);
    return true;
  }
  return false;
}