Skip to content

Commit

Permalink
util/gpool/spmc: add a sleep to a simple for (pingcap#41240)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala authored and blacktear23 committed Feb 15, 2023
1 parent e6646f0 commit c53003a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions util/gpool/spmc/spmcpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func (p *Pool[T, U, C, CT, TF]) ReleaseAndWait() {
if p.Running() == 0 && p.heartbeatDone.Load() && p.waitingTask.Load() == 0 {
return
}
time.Sleep(5 * time.Millisecond)
}
}

Expand Down

0 comments on commit c53003a

Please sign in to comment.