Skip to content

Commit

Permalink
fix error on exit for an invalid remote reference
Browse files Browse the repository at this point in the history
(backport of d546f9a)
  • Loading branch information
amitmurthy authored and tkelman committed Dec 1, 2015
1 parent bf4eeab commit 8b3c67b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions base/multi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,7 @@ end
function send_del_client(rr::RemoteRef)
if rr.where == myid()
del_client(rr2id(rr), myid())
else
if in(rr.where, map_del_wrkr)
# for a removed worker, don't bother
return
end
elseif rr.where in procs() # process only if a valid worker
w = worker_from_id(rr.where)
push!(w.del_msgs, (rr2id(rr), myid()))
w.gcflag = true
Expand All @@ -572,7 +568,6 @@ function send_del_client(rr::RemoteRef)
end

function add_client(id, client)
#println("$(myid()) adding client $client to $id")
rv = lookup_ref(id)
push!(rv.clientset, client)
nothing
Expand All @@ -587,12 +582,11 @@ end
function send_add_client(rr::RemoteRef, i)
if rr.where == myid()
add_client(rr2id(rr), i)
elseif i != rr.where
elseif (i != rr.where) && (rr.where in procs())
# don't need to send add_client if the message is already going
# to the processor that owns the remote ref. it will add_client
# itself inside deserialize().
w = worker_from_id(rr.where)
#println("$(myid()) adding $((rr2id(rr), i)) for $(rr.where)")
push!(w.add_msgs, (rr2id(rr), i))
w.gcflag = true
notify(any_gc_flag)
Expand Down

1 comment on commit 8b3c67b

@tkelman
Copy link
Contributor

@tkelman tkelman commented on 8b3c67b Dec 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to do this one manually because of a conflict, and forgot to add the PR x-ref: #14166

Please sign in to comment.