Skip to content

Commit b506b1d

Browse files
committed
simplify dmap a bit
1 parent 04e0b16 commit b506b1d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/base.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,8 @@ Call a function `fn` on `workers`, with a single parameter arriving from the
314314
corresponding position in `arr`.
315315
"""
316316
function dmap(arr::Vector, fn, workers)
317-
futures = [
318-
remotecall(() -> Base.eval(Main, :($fn($(arr[i])))), pid) #TODO convert to get_from
319-
for (i, pid) in enumerate(workers)
320-
]
321-
return [fetch(f) for f in futures]
317+
fetch.([get_from(w, :($fn($(arr[i]))))
318+
for (i, w) in enumerate(workers)])
322319
end
323320

324321
"""

0 commit comments

Comments
 (0)