Merge pull request #1975 from molecula/remove-worker-pool-mu

[FB-1250] Remove unnecessary worker pool mutex
This commit is contained in:
Ben Johnson 2022-03-14 12:47:11 -06:00 • committed by GitHub
commit 00924a2834
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}