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

TLazThreadedQueue.create

Constructor for the class instance.

Declaration

Source position: lazcollections.pas line 107

public constructor TLazThreadedQueue.create(

  AQueueDepth: Integer = 10;

  PushTimeout: Cardinal = INFINITE;

  PopTimeout: Cardinal = INFINITE

);

Arguments

AQueueDepth

  

Indicates the maximum number of items that can be stored in the thread-safe queue.

PushTimeout

  

Number of ticks (milliseconds) to wait for successful completion of an enqueue request.

PopTimeout

  

Number of ticks (milliseconds) to wait for successful completion of a dequeue request.

Description

Create is the constructor for the class instance. Create allocates internal resources used to implement the thread-safe queue, and sets the default values for its properties.

The value in AQueueDepth is passed as an argument to the Grow method to allocate the internal storage for the queue.

PushTimeout and PopTimeout indicate the number of milliseconds (or ticks) to wait for successful completion of enqueue or dequeue requests, and are assigned as the default value for the corresponding internal members in the class instance.

See also

TLazThreadedQueue.Grow

  

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

TLazThreadedQueue.PushItem

  

Adds the specified item to the queue.

TLazThreadedQueue.PopItem

  

Pops the next item from the queue.

TLazThreadedQueue.Destroy

  

Destructor for the class instance.


Version 4.0 Generated 2025-05-03 Home