1. with Ada.Exceptions;    use Ada.Exceptions; 
  2. with Ada.Text_IO;       use Ada.Text_IO; 
  3. with Calculation_Nodes; use Calculation_Nodes; 
  4. with Hold_when_Busy;    use Hold_when_Busy; 
  5.  
  6. package body Central_Server is 
  7.  
  8.    task body Server is 
  9.  
  10.    begin 
  11.       loop 
  12.          select 
  13.             accept Compute (Job : Jobs; Diverge_Column : out Natural_Array) do 
  14.                for Node of Compute_Nodes loop 
  15.                   select 
  16.                      Node.Responsive; 
  17.                      requeue Node.Compute; 
  18.                   else 
  19.                      null; 
  20.                   end select; 
  21.                end loop; 
  22.                requeue Busy_Nodes.Hold; 
  23.             end Compute; 
  24.          or 
  25.             terminate; 
  26.          end select; 
  27.       end loop; 
  28.    exception 
  29.       when E : others => Put_Line (Exception_Information (E)); 
  30.    end Server; 
  31.  
  32. end Central_Server;