with Ada.Exceptions; use Ada.Exceptions;
with Ada.Text_IO; use Ada.Text_IO;
with Calculation_Nodes; use Calculation_Nodes;
with Hold_when_Busy; use Hold_when_Busy;
package body Central_Server is
task body Server is
begin
loop
select
accept Compute (Job : Jobs; Diverge_Column : out Natural_Array) do
for Node of Compute_Nodes loop
select
Node.Responsive;
requeue Node.Compute;
else
null;
end select;
end loop;
requeue Busy_Nodes.Hold;
end Compute;
or
terminate;
end select;
end loop;
exception
when E : others => Put_Line (Exception_Information (E));
end Server;
end Central_Server;