608
608
function send_del_client (rr)
609
609
if rr. where == myid ()
610
610
del_client (remoteref_id (rr), myid ())
611
- else
612
- if in (rr. where, map_del_wrkr)
613
- # for a removed worker, don't bother
614
- return
615
- end
611
+ elseif rr. where in procs () # process only if a valid worker
616
612
w = worker_from_id (rr. where)
617
613
push! (w. del_msgs, (remoteref_id (rr), myid ()))
618
614
w. gcflag = true
@@ -621,7 +617,6 @@ function send_del_client(rr)
621
617
end
622
618
623
619
function add_client (id, client)
624
- # println("$(myid()) adding client $client to $id")
625
620
rv = lookup_ref (id)
626
621
push! (rv. clientset, client)
627
622
nothing
@@ -636,12 +631,11 @@ end
636
631
function send_add_client (rr:: AbstractRemoteRef , i)
637
632
if rr. where == myid ()
638
633
add_client (remoteref_id (rr), i)
639
- elseif i != rr. where
634
+ elseif ( i != rr. where) && (rr . where in procs ())
640
635
# don't need to send add_client if the message is already going
641
636
# to the processor that owns the remote ref. it will add_client
642
637
# itself inside deserialize().
643
638
w = worker_from_id (rr. where)
644
- # println("$(myid()) adding $((remoteref_id(rr), i)) for $(rr.where)")
645
639
push! (w. add_msgs, (remoteref_id (rr), i))
646
640
w. gcflag = true
647
641
notify (any_gc_flag)
0 commit comments