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

TLazThreadedQueue.PushItem

Adds the specified item to the queue.

Declaration

Source position: lazcollections.pas line 110

public function TLazThreadedQueue.PushItem(

  const AItem: T

):TWaitResult;

Arguments

AItem

  

Item added to the storage for the queue.

Function result

Contains the status for the enqueue request.

Description

PushItem is a TWaitResult function used to add the item specified in AItem to the thread-safe queue.

PushItem uses the value in the internal PushTimeout member to determine if a timeout is in effect for the enqueue request. When PushTimeout contains INFINITE, a timeout is not used for the operation. Instead, the request waits for an RTL Event that indicates room is available in the internal storage for the queue.

When PushTimeout contains 0, the request will timeout after the first failed attempt to add the specified item to the queue.

When ShutDown contains True, the return value is updated to indicate that the request should be abandoned.

The return value contains a TWaitResult enumeration value that indicates the status for the enqueue request. See TWaitResult for more information about enumeration values and their meanings.

See also

TLazThreadedQueue.ShutDown

  

Indicates if the DoShutdown method has been called but not finished.

TWaitResult

RTLEventWaitFor


Version 4.0 Generated 2025-05-03 Home