mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
remove incorrect use of WaitGroup (#16596)
This commit is contained in:
@@ -1029,7 +1029,6 @@ type BatchJobPool struct {
|
||||
mu sync.Mutex
|
||||
jobCh chan *BatchJobRequest
|
||||
workerKillCh chan struct{}
|
||||
workerWg sync.WaitGroup
|
||||
workerSize int
|
||||
}
|
||||
|
||||
@@ -1074,7 +1073,6 @@ func (j *BatchJobPool) AddWorker() {
|
||||
if j == nil {
|
||||
return
|
||||
}
|
||||
defer j.workerWg.Done()
|
||||
for {
|
||||
select {
|
||||
case <-j.ctx.Done():
|
||||
@@ -1110,7 +1108,6 @@ func (j *BatchJobPool) ResizeWorkers(n int) {
|
||||
|
||||
for j.workerSize < n {
|
||||
j.workerSize++
|
||||
j.workerWg.Add(1)
|
||||
go j.AddWorker()
|
||||
}
|
||||
for j.workerSize > n {
|
||||
|
||||
Reference in New Issue
Block a user