2020-12-22 14:27:39 +03:00
|
|
|
package audittask
|
|
|
|
|
|
|
|
// Reset pops all tasks from the queue.
|
2020-12-22 15:34:38 +03:00
|
|
|
// Returns amount of popped elements.
|
|
|
|
func (m *Manager) Reset() (popped int) {
|
|
|
|
for ; len(m.ch) > 0; popped++ {
|
2020-12-22 14:27:39 +03:00
|
|
|
<-m.ch
|
|
|
|
}
|
2020-12-22 15:34:38 +03:00
|
|
|
|
|
|
|
return
|
2020-12-22 14:27:39 +03:00
|
|
|
}
|