Removes a specific task from the queue.
task
Returns true if the task was found and removed, false otherwise.
true
false
bool removeTask(Task<T> task) { return _ifNotExecuting(() => tasks.remove(task)) ?? false; }