Compare commits

..

1 Commits

Author SHA1 Message Date
kevin
a3d7474ae0 fix data race 2020-08-14 11:03:16 +08:00

View File

@@ -139,9 +139,7 @@ func (pe *PeriodicalExecutor) executeTasks(tasks interface{}) bool {
pe.wgBarrier.Guard(func() {
pe.waitGroup.Add(1)
})
defer pe.wgBarrier.Guard(func() {
pe.waitGroup.Done()
})
defer pe.waitGroup.Done()
ok := pe.hasTasks(tasks)
if ok {