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

TLazThreadedQueue.Grow

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

Declaration

Source position: lazcollections.pas line 109

public procedure TLazThreadedQueue.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

TLazThreadedQueue.Lock

  

Enters the Monitor used for resource protection.

TLazThreadedQueue.Unlock

  

Leaves the Monitor used for resource protection.

TLazThreadedQueue.TLazTypedFifoQueue

  

Type used to the specialize the internal TLazFifoQueue instance for the class.

TLazFifoQueue.Grow

  

Resizes the internal storage for the queue by the specified Delta value.

TLazMonitor

  

Implements a synchronization construct which provides thread-safe access to resources.


Version 4.0 Generated 2025-05-03 Home