Clears the task queue.
(&mut self)
| 512 | |
| 513 | /// Clears the task queue. |
| 514 | pub fn clear(&mut self) { |
| 515 | self.tasks.clear(); |
| 516 | self.next_task_sequence = 0; |
| 517 | self.task_queue_length.send_replace(0); |
| 518 | Metrics::engine_task_queue_depth().set(0.0); |
| 519 | } |
| 520 | |
| 521 | /// Attempts to drain the queue by executing all [`EngineTask`]s in-order. If any task returns |
| 522 | /// an error along the way, it is not popped from the queue (in case it must be retried) and |