TLazThreadedQueue.PopItemTimeout function
Pops an item off the queue with a timeout value.
Declaration
function PopItemTimeout(out AItem: T; Timeout: Cardinal): TWaitResultArguments
AItem | Item removed from the queue. |
Timeout | Maximum number of ticks to wait for the item to be removed from the queue. |
Function result
Contains the status for the dequeue request.
Description
PopItemTimeout is a
TWaitResult function used to remove
the next available item in the queue with a timeout in effect for the dequeue
operation.
AItem is an output parameter used to return the item removed from the thread-safe queue.
Timeout specifies the number of ticks (milliseconds) to wait for
successful completion of the dequeue request. When Timeout contains the value
INFINITE, a timeout is not used in the method. Instead, an
internal RTL event is signalled to wait for an available item in the queue.
When Timeout contains
0, the request returns immediately after the
first failed attempt to dequeue an item.
When ShutDown contains True, the method updates the return
value to indicate that the request was abandoned.
The return value contains a TWaitResult enumeration value that
indicates the status for the dequeue request. See TWaitResult for
more information about enumeration values and their meanings.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
