Справочник по Ada 2012
A.18.28 Общий пакет Containers.Unbounded_Synchronized_Queues
Статическая семантика
Определяемый языком общий пакет Containers.Unbounded_Synchronized_Queues предоставляет тип Queue, который реализует интерфейсный тип Containers.Synchronized_Queue_Interfaces.Queue.
with System;
with Ada.Containers.Synchronized_Queue_Interfaces;
generic
with package Queue_Interfaces is new Ada.Containers.Synchronized_Queue_Interfaces (<>);
Default_Ceiling : System.Any_Priority := System.Priority'Last;
package Ada.Containers.Unbounded_Synchronized_Queues is
pragma Preelaborate(Unbounded_Synchronized_Queues);
with Ada.Containers.Synchronized_Queue_Interfaces;
generic
with package Queue_Interfaces is new Ada.Containers.Synchronized_Queue_Interfaces (<>);
Default_Ceiling : System.Any_Priority := System.Priority'Last;
package Ada.Containers.Unbounded_Synchronized_Queues is
pragma Preelaborate(Unbounded_Synchronized_Queues);
package Implementation is
... -- не определено языком
end Implementation;
... -- не определено языком
end Implementation;
protected type Queue
(Ceiling : System.Any_Priority := Default_Ceiling)
with Priority => Ceiling is
new Queue_Interfaces.Queue with
(Ceiling : System.Any_Priority := Default_Ceiling)
with Priority => Ceiling is
new Queue_Interfaces.Queue with
overriding
entry Enqueue (New_Item : in Queue_Interfaces.Element_Type);
overriding
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
entry Enqueue (New_Item : in Queue_Interfaces.Element_Type);
overriding
entry Dequeue (Element : out Queue_Interfaces.Element_Type);
overriding
function Current_Use return Count_Type;
overriding
function Peak_Use return Count_Type;
function Current_Use return Count_Type;
overriding
function Peak_Use return Count_Type;
private
... -- не определено языком
end Queue;
... -- не определено языком
end Queue;
private
... -- не определено языком
end Ada.Containers.Unbounded_Synchronized_Queues;
Тип Queue используется для представления безопасных очередей задач.
Емкость экземпляров типа Queue неограничена.