Skip to content

Commit

Permalink
Pass context to collect_remote
Browse files Browse the repository at this point in the history
Fixes #143 
Avoids creation of a new context
  • Loading branch information
DrChainsaw committed Sep 29, 2020
1 parent 98caa9d commit 14316e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/chunks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ function unrelease(c::Chunk{<:Any,DRef})
end
unrelease(c::Chunk) = c

collect_remote(chunk::Chunk) =
move(Context(), chunk.processor, OSProc(), poolget(chunk.handle))
collect_remote(ctx, chunk::Chunk) =
move(ctx, chunk.processor, OSProc(), poolget(chunk.handle))
function collect(ctx::Context, chunk::Chunk; options=nothing)
# delegate fetching to handle by default.
if chunk.handle isa DRef && !(chunk.processor isa OSProc)
return remotecall_fetch(collect_remote, chunk.handle.owner, chunk)
return remotecall_fetch(collect_remote, chunk.handle.owner, ctx, chunk)
elseif chunk.handle isa FileRef
return poolget(chunk.handle)
else
Expand Down

0 comments on commit 14316e8

Please sign in to comment.