559
559
function send_del_client (rr:: RemoteRef )
560
560
if rr. where == myid ()
561
561
del_client (rr2id (rr), myid ())
562
- else
563
- if in (rr. where, map_del_wrkr)
564
- # for a removed worker, don't bother
565
- return
566
- end
562
+ elseif rr. where in procs () # process only if a valid worker
567
563
w = worker_from_id (rr. where)
568
564
push! (w. del_msgs, (rr2id (rr), myid ()))
569
565
w. gcflag = true
@@ -572,7 +568,6 @@ function send_del_client(rr::RemoteRef)
572
568
end
573
569
574
570
function add_client (id, client)
575
- # println("$(myid()) adding client $client to $id")
576
571
rv = lookup_ref (id)
577
572
push! (rv. clientset, client)
578
573
nothing
@@ -587,12 +582,11 @@ end
587
582
function send_add_client (rr:: RemoteRef , i)
588
583
if rr. where == myid ()
589
584
add_client (rr2id (rr), i)
590
- elseif i != rr. where
585
+ elseif ( i != rr. where) && (rr . where in procs ())
591
586
# don't need to send add_client if the message is already going
592
587
# to the processor that owns the remote ref. it will add_client
593
588
# itself inside deserialize().
594
589
w = worker_from_id (rr. where)
595
- # println("$(myid()) adding $((rr2id(rr), i)) for $(rr.where)")
596
590
push! (w. add_msgs, (rr2id (rr), i))
597
591
w. gcflag = true
598
592
notify (any_gc_flag)
0 commit comments