Remove unnecessary worker pool mutex

This commit is contained in:
Ben Johnson 2022-03-14 09:56:08 -06:00
parent 9e3734e9cc
commit 01e8a59f76

View file

@ -60,7 +60,6 @@ type executor struct {
shutdown bool
workers *task.Pool
workerPoolMu sync.Mutex
workerPoolSize int
work chan job
@ -6066,8 +6065,6 @@ func (e *executor) mapperLocal(ctx context.Context, shards []uint64, mapFn mapFu
ctx, cancel := context.WithCancel(ctx)
defer cancel()
done := ctx.Done()
e.workerPoolMu.Lock()
defer e.workerPoolMu.Unlock()
if e.shutdown {
return nil, errShutdown
}