From 01e8a59f76e1d16f9febbb133cdaa9b2a6a03b1d Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Mon, 14 Mar 2022 09:56:08 -0600 Subject: [PATCH] Remove unnecessary worker pool mutex --- executor.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/executor.go b/executor.go index 136753a65..40ca4cd05 100644 --- a/executor.go +++ b/executor.go @@ -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 }