[Overview][Types][Classes][Index] Reference for unit 'LazCollections' (#lazutils)

TLazFifoQueue.PopItem

Pops an item of the specified type off of the head of the queue.

Declaration

Source position: lazcollections.pas line 72

public function TLazFifoQueue.PopItem(

  out AItem: T

):Boolean; virtual;

Arguments

AItem

  

Item retrieved from the head of the queue.

Function result

True if the item was retrieved from the queue storage, False if the queue is empty.

Description

PopItem is a Boolean function used to get the value in AItem from the head of the queue. The return value is True if the queue was not empty when the method was called. No actions are performed in the method when items have not been stored in the internal storage for the queue.

PopItem retrieves the value in AItem from the storage slot at TotalItemsPopped mod QueueSize, and increments the value in the TotalItemsPopped property.

Use PushItem to add an item to the tail of the queue.

See also

TLazFifoQueue.IsEmpty

  

Indicates if none of the internal storage slots have been used in the queue storage.

TLazFifoQueue.QueueSize

  

Size (or depth) for the queue.

TLazFifoQueue.PushItem

  

Pushes an item of the specified type onto the tail of the queue.


Version 4.0 Generated 2025-05-03 Home