--  A library-level array of tasks (SPARK-22, D199): each component is a task of its own,
--  started with the others once library elaboration is over.
package Workers is
   subtype Small is Natural range 0 .. 100;
   protected Tally is
      procedure Add (N : Natural) with Pre => N <= 100;
      entry Wait_All (Sum : out Natural);
   private
      Total : Natural := 0;
      Count : Natural := 0;
      Done : Boolean := False;
   end Tally;
   task type Worker (Id : Small);
   Single : Worker (10);
   Pool : array (1 .. 3) of Worker (1);
end Workers;
