2ebcbe70fb
Add numeric return from TaskManager.Reset method that shows the number of canceled tasks. This values will be used for assessment of the progress of the audit. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
11 lines
194 B
Go
11 lines
194 B
Go
package audittask
|
|
|
|
// Reset pops all tasks from the queue.
|
|
// Returns amount of popped elements.
|
|
func (m *Manager) Reset() (popped int) {
|
|
for ; len(m.ch) > 0; popped++ {
|
|
<-m.ch
|
|
}
|
|
|
|
return
|
|
}
|