* Dequeues the task and returns "true" if dequeueing is successful. Otherwise * returns "false", e.g. when this task is not currently enqueued. * @param {!TaskDef} task * @return {boolean}
(task)
| 90 | * @return {boolean} |
| 91 | */ |
| 92 | dequeue(task) { |
| 93 | const existing = this.taskIdMap_[task.id]; |
| 94 | const dequeued = this.removeAtIndex(task, this.tasks_.indexOf(existing)); |
| 95 | if (!dequeued) { |
| 96 | return false; |
| 97 | } |
| 98 | this.lastDequeueTime_ = Date.now(); |
| 99 | return true; |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Returns the task with the minimal score based on the provided scoring |
no test coverage detected