1. with Ada.Exceptions; use Ada.Exceptions; 
  2. with Ada.Text_IO;    use Ada.Text_IO; 
  3. with Central_Server; use Central_Server; 
  4.  
  5. package body Client_Agents is 
  6.  
  7.    task body Agent is 
  8.  
  9.    begin 
  10.       loop 
  11.          select 
  12.             accept Process (x : Pix_Range_x) do 
  13.                Server.Compute 
  14.                  (Job => (Origin     => (Re => Min_x * Resolution * Real (x), 
  15.                                          Im => Min_y * Resolution), 
  16.                           Resolution => Resolution), 
  17.                   Diverge_Column => Mandelbrot_Set (x)); 
  18.             end Process; 
  19.          or 
  20.             terminate; 
  21.          end select; 
  22.       end loop; 
  23.    exception 
  24.       when E : others => Put_Line (Exception_Information (E)); 
  25.    end Agent; 
  26.  
  27. end Client_Agents;