()
| 93 | } |
| 94 | |
| 95 | func (tq *TaskQueue[T]) Length() int { |
| 96 | tq.mu.RLock() |
| 97 | defer tq.mu.RUnlock() |
| 98 | return tq.tasks.Len() |
| 99 | } |
| 100 | |
| 101 | // ActiveLength returns the number of non-cancelled tasks in the queue. |
| 102 | func (tq *TaskQueue[T]) ActiveLength() int { |
no outgoing calls