PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Operating mode for a multithread management
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Dequeues an element from a queue. The element is deleted from the queue and returned in the specified variable.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Java This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Java This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Java This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
MyQueue is Queue of int

// Enqueues the values 1, 2 and 3
Enqueue(MyQueue, 1)
Enqueue(MyQueue, 2)
Enqueue(MyQueue, 3)

// Display the trace: 1, 2, 3
x is int
WHILE Dequeue(MyQueue, x)
Trace(x)
END
Syntax

Retrieving the element at the beginning of queue Hide the details

<Result> = Dequeue(<Queue Name> [, <Element>])
<Result>: Boolean
  • True if the element was dequeued,
  • False if the queue is empty.
<Queue Name>: Queue
Name of queue variable to use.
<Element>: Type of elements handled by the queue, optional parameter
Name of variable into which the value of dequeued element is returned. If this parameter is not specified, the element is dequeued but its value is not retrieved.

Retrieving the element at the beginning of queue (multithread syntax) Hide the details

<Result> = Dequeue(<Queue Name> [, <Element> [, <Options> [, <Time-out>]]])
<Result>: Boolean
  • True if the element was dequeued,
  • False if the time-out is exceeded (<Time-out> parameter) or if ..AdditionCompleted becomes True.
<Queue Name>: Queue
Name of queue variable to use.
<Element>: Type of elements handled by the queue, optional parameter
Name of variable into which the value of dequeued element is returned. If this parameter is not specified, the element is dequeued but its value is not retrieved.
<Options>: Optional Integer constant
Option for managing the queue:
WaitIfEmptyWaits for an element to be added into the queue by another thread.
<Time-out>: Optional integer or optional Duration
Maximum time-out expressed in hundredths of a second. This parameter can correspond to:
  • an integer corresponding to the number of hundredths of a second,
  • a Duration variable,
  • Versions 23 and later
    the direct indication of duration (1 s or 10 ms for example).
    New in version 23
    the direct indication of duration (1 s or 10 ms for example).
    the direct indication of duration (1 s or 10 ms for example).
This parameter corresponds to the Infinite constant by default (no maximum time-out).
Remarks

Operating mode for a multithread management

If an element is found in the queue, it is deleted from the queue and returned by the <Element> parameter by address.
If the queue is empty, Dequeue waits for an element to be added into the queue. The maximum time-out can be specified by the <Time-out> parameter.
The function returns True if an element was dequeued, False if the time-out is exceeded or if ..AdditionCompleted becomes True.
..NbPendingThread returns the number of pending threads.
The assignment of ..AdditionCompleted to True provokes the end of the time-out for all the pending threads. In this case, Dequeue returns False.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment