From RAD Studio API Documentation
Jump to: navigation, search


function PushItem(const AItem: T): TWaitResult; overload;
function PushItem(const AItem: T; var AQueueSize: Integer): TWaitResult; overload;


System::Types::TWaitResult __fastcall PushItem(const T AItem)/* overload */;
System::Types::TWaitResult __fastcall PushItem(const T AItem, int &AQueueSize)/* overload */;


Type Visibility Source Unit Parent
function public
System.Generics.Collections TThreadedQueue


Pushes a new item into the queue.

Use PushItem to add a new item to the queue according to the First In, First Out data management.

There are two overloaded PushItem methods: one with a single parameter, AItem, and one with two parameters, AItem and AQueueSize. AItem is the item to insert and AQueueSize is the position to which the item will be inserted.

If the queue is full, the monitor waits for it to free an element. If no element is freed in PushTimeout, the method returns wrTimeout; otherwise, the method returns wrSignaled.

See Also