>
|
p := proc()
uses Grid;
if MyNode()=0 then
Receive(); # wait for a message
elif MyNode()=1 then
# interrupt everybody else
for i from 2 to NumNodes()-1 do
Interrupt(i);
end do;
# notify node 0
Grid:-Util:-Send(0, true);
else
# all other nodes are in an infinite loop
while true do end do;
end if;
end proc;
|