Skip to content

Commit

Permalink
add lock around serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
krynju committed Dec 19, 2021
1 parent 6817551 commit fb605fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stdlib/Distributed/src/remotecall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ function serialize(s::ClusterSerializer, f::Future)
p = worker_id_from_socket(s.io)
(p !== f.where) && send_add_client(f, p)
end
invoke(serialize, Tuple{ClusterSerializer, Any}, s, f)
@lock f.lock begin
invoke(serialize, Tuple{ClusterSerializer, Any}, s, f)
end
end

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

0 comments on commit fb605fa

Please sign in to comment.