Skip to content

Commit

Permalink
fix data race
Browse files Browse the repository at this point in the history
  • Loading branch information
kevwan committed Aug 14, 2020
1 parent 6fdee77 commit a3d7474
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/executors/periodicalexecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a3d7474

Please sign in to comment.