Sign in Join
FPDoc Onlineexperiment

TLazFifoQueue.PopItem function

Member of TLazFifoQueuepublicIn unit LazCollections

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

Declaration

pascal
function 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.