PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
Stops the execution of the current thread.
Versions 21 and later
Apple Watch This function is now available in Apple Watch 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.
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.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 23 and later
Java This function is now available for Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
New in version 23
Java This function is now available for Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Java This function is now available for Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Example
ThreadEnd()
Syntax
ThreadEnd()
Remarks
  • If the current thread is the main thread, ThreadEnd is equivalent to EndProgram: the application is stopped.
  • To stop a secondary thread, you have the ability to implement a stop system via ThreadEnd. You have the ability to:
    • declare a Boolean global variable in the main thread (gbEnd for example). This variable is used to find out whether the secondary thread mus be stopped.
    • in the secondary thread, check the value of the variable. If it is set to True, use ThreadEnd to end the current secondary thread.
    • In the main thread, put the variable to True to force the secondary thread to stop.
    Example:
    // Code of main thread
    gbEnd is boolean
    gbEnd = False
    ...
    // Start the secondary thread
    ThreadExecute("Thread1", threadNormal, ThreadProcedure)
    ...

    // End the secondary thread
    gbEnd = True

    // Code of secondary thread
    ...
    IF gbEnd = True THEN ALORS ThreadEnd()
    ...
Component : wd250vm.dll
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment