Skip to content

Commit 7eb1786

Browse files
committed
parametrize the module for dpmap
1 parent 3ede70b commit 7eb1786

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/base.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ function dmap(arr::Vector, fn, workers)
319319
end
320320

321321
"""
322-
dpmap(fn, args...; kwargs...)
322+
dpmap(fn, args...; mod = Main, kwargs...)
323323
324324
"Distributed pool map."
325325
@@ -341,8 +341,8 @@ di = distributeSomeData()
341341
dpmap(x -> :(computeSomething(\$(di.val), \$x)), CachingPool(di.workers), Vector(1:10))
342342
```
343343
"""
344-
function dpmap(fn, args...; kwargs...)
345-
return pmap(x -> Base.eval(Main,fn(x)), args...; kwargs...)
344+
function dpmap(fn, args...; mod = Main, kwargs...)
345+
return pmap(x -> Base.eval(mod, fn(x)), args...; kwargs...)
346346
end
347347

348348
"""

0 commit comments

Comments
 (0)