ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Process functions / Threads, semaphores, signals and mutex
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Waits for the end of the execution of the specified thread. A maximum timeout can be specified.
Reminder A thread is a process launched in parallel with the current application ("main thread"). This allows you to run a task in the background (e.g. backup, etc.).
Example
ThreadExecute("Thread1", threadNormal, ProcédureThread)
...
ThreadWait("Thread1", 300)
WINDEVWEBDEV - Server codeiPhone/iPadIOS WidgetApple Watch
// Construit un thread
t is Thread(Proc, ("Premier paramètre", 2))
// Déclenche l'exécution du thread
ThreadExecute(t)
...
ThreadWait(t, 300)
Syntax

Waiting for the end of the thread execution (use thread name) Hide the details

<Result> = ThreadWait(<Thread name> [, <Maximum timeout>])
<Result>: Boolean
  • True if the thread was stopped or if the thread does not exist,
  • False if the thread is not stopped (the maximum duration is exceeded).
<Thread name>: Character string
Name of thread that must reach the end of its execution. This name is given when running the thread (ThreadExecute).
<Maximum timeout>: Optional integer, optional duration or optional constant
Maximum timeout in hundredths of a second.
  • If the thread is not stopped at the end of specified duration, <Result> is set to False.
  • If this parameter is not specified or corresponds to the Infinite constant, the wait is infinite.
This parameter can correspond to:
  • an integer corresponding to the number of hundredths of a second,
  • a Duration variable,
  • the duration in a readable format (e.g., 1 s or 10 ms).
WINDEVWEBDEV - Server codeiPhone/iPadIOS WidgetApple Watch

Wait for the end of the thread execution (use of a Thread variable) Hide the details

<Result> = ThreadWait(<Thread to wait for> [, <Maximum timeout>])
<Result>: Boolean
  • True if the thread was stopped or if the thread does not exist,
  • False if the thread is not stopped (the maximum duration is exceeded).
<Thread to wait for>: Thread variable
Name of the Thread variable that corresponds to the thread that must reach the end of its execution.
<Maximum timeout>: Optional integer, optional duration or optional constant
Maximum timeout in hundredths of a second.
  • If the thread is not stopped at the end of specified duration, <Result> is set to False.
  • If this parameter is not specified or corresponds to the Infinite constant, the wait is infinite.
This parameter can correspond to:
  • an integer corresponding to the number of hundredths of a second,
  • a Duration variable,
  • the duration in a readable format (e.g., 1 s or 10 ms).
Business / UI classification: Neutral code
Component: wd300vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help