System.Generics.Collections.TThreadedQueue.PushItem
Delphi
function PushItem(const AItem: T): TWaitResult; overload;
function PushItem(const AItem: T; var AQueueSize: Integer): TWaitResult; overload;
C++
System::Types::TWaitResult __fastcall PushItem(const T AItem)/* overload */;
System::Types::TWaitResult __fastcall PushItem(const T AItem, int &AQueueSize)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | TThreadedQueue |
Description
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.