Skip to content

Commit

Permalink
Merge pull request #43465 from krynju/kr/remove-future-copy-on-serialize
Browse files Browse the repository at this point in the history
[Distributed] Remove (now) unnecessary copy of the Future in its serializer
  • Loading branch information
vchuravy authored Dec 18, 2021
2 parents 69a879e + 9a7a078 commit 6817551
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions stdlib/Distributed/src/remotecall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,7 @@ function serialize(s::ClusterSerializer, f::Future)
p = worker_id_from_socket(s.io)
(p !== f.where) && send_add_client(f, p)
end
fc = Future((f.where, f.whence, f.id, v_cache)) # copy to be used for serialization (contains a reset lock)
invoke(serialize, Tuple{ClusterSerializer, Any}, s, fc)
invoke(serialize, Tuple{ClusterSerializer, Any}, s, f)
end

function serialize(s::ClusterSerializer, rr::RemoteChannel)
Expand Down

0 comments on commit 6817551

Please sign in to comment.