removeTask method

bool removeTask(
  1. Task<T> task
)

Removes a specific task from the queue.

Returns true if the task was found and removed, false otherwise.

Implementation

bool removeTask(Task<T> task) {
  return _ifNotExecuting(() => tasks.remove(task)) ?? false;
}