diff --git a/stdlib/Distributed/src/workerpool.jl b/stdlib/Distributed/src/workerpool.jl index 6250e99a1d7c0..354c61c845113 100644 --- a/stdlib/Distributed/src/workerpool.jl +++ b/stdlib/Distributed/src/workerpool.jl @@ -309,7 +309,7 @@ For global variables, only the bindings are captured in a closure, not the data. const foo = rand(10^8); wp = CachingPool(workers()) let foo = foo - pmap(wp, i -> sum(foo) + i, 1:100); + pmap(i -> sum(foo) + i, wp, 1:100); end ```