|
|
|
|
|
- Operating mode for a multithread management
<Queue variable>.Dequeue (Function) In french: <Variable File>.Défile Removes an element from the queue. The element is removed from the queue and returned in the specified variable.
New in version 2025MyQueue is Queue of int // Enqueues the values 1, 2 and 3 MyQueue.Enqueue(1) MyQueue.Enqueue(2) MyQueue.Enqueue(3) // Display the trace: 1, 2, 3 x is int WHILE MyQueue.Dequeue(x) Trace(x) END
Syntax
Retrieving the element at the beginning of the queue Hide the details
<Result> = <Queue>.Dequeue([<Element>])
<Result>: Boolean - True if the element was removed from the queue,
- False if the queue is empty.
<Queue>: Queue Name of the Queue variable to be used. <Element>: Type of elements handled by the queue, optional parameter Name of the variable in which the value of the removed element is returned. If this parameter is not specified, the element is removed but its value is not retrieved. Remarks Operating mode for a multithread management If an element is in the queue, it is removed from the queue and returned by the <Element> parameter by reference. If the queue is empty, <Queue variable>.Dequeue waits for an element to be added to the queue. The maximum timeout can be specified by the <Timeout> parameter. The function returns True if an element has been removed from the queue. Otherwise, it returns False if the timeout has been reached or if the AdditionCompleted property is set to True. The assignment of AdditionCompleted to True provokes the end of the timeout for all the pending threads. In this case, <Queue variable>.Dequeue returns False.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|