Sign in Join
FPDoc Onlineexperiment

TLazThreadedQueue.Grow procedure

Member of TLazThreadedQueuepublicIn unit LazCollections

Expands (or shrinks) the allocated storage for the queue by the specified size.

Declaration

pascal
procedure Grow(ADelta: Integer)

Arguments

ADelta

Value used to increase the size of the queue.

Description

Grow is a method used to resize the internal storage for the queue by the specified Delta value.

When ADelta is a position Integer value, the size for the internal array is enlarged by the value specified number of entries. When ADelta is a negative Integer value, the internal storage is shrunk by the specified number of entries.

Grow reallocates the internal array used to store the item types for the specialization. Existing items in the queue are moved to the new array, and the internal storage is updated.

The value in the QueueSize property is set to the new length for the internal array.

Grows uses resource protection when calling the Grow method in the internal TLazFifoQueue instance in the class.

See also

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