chore: pool: do not export MarkTaskComplete
This commit is contained in:
parent
cfeaaacc69
commit
97564af275
@ -59,7 +59,7 @@ func (tp *TaskPool) WaitForTask(taskID int) {
|
|||||||
<-waitChan
|
<-waitChan
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tp *TaskPool) MarkTaskComplete(taskID int) {
|
func (tp *TaskPool) markTaskComplete(taskID int) {
|
||||||
tp.lck.Lock()
|
tp.lck.Lock()
|
||||||
defer tp.lck.Unlock()
|
defer tp.lck.Unlock()
|
||||||
|
|
||||||
|
@ -19,6 +19,6 @@ func (w *Worker) Start(wg *sync.WaitGroup) {
|
|||||||
|
|
||||||
for task := range w.queue {
|
for task := range w.queue {
|
||||||
task.f()
|
task.f()
|
||||||
w.pool.MarkTaskComplete(task.id)
|
w.pool.markTaskComplete(task.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user