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
Locks the current thread while waiting for the specified event to be opened.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
Universal Windows 10 App This function is now available for Windows Phone applications.
New in version 17
Universal Windows 10 App This function is now available for Windows Phone applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Versions 19 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
WINDEVLinux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
New in version 19
iPhone/iPad This function is now available for iPhone/iPad applications.
WINDEVLinux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
iPhone/iPad This function is now available for iPhone/iPad applications.
WINDEVLinux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
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.
Example
// Create an event
EventCreate("Let's go", eventAutomatic, eventClose)
// Run a first thread
ThreadExecute("Thread1", threadNormal, "Thread_First")
// Locks the current thread until the event is obtained
ThreadWaitSignal()
 
// Run a second thread
ThreadExecute("Thread2", threadNormal, "Thread_Second")
// Locks the current thread until the event is obtained
ThreadWaitSignal()
 
// Modifies the event to run the threads
EventChange("Let's go", eventOpen)
PROCEDURE Thread_First()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Event received")
PROCEDURE Thread_Second()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Event received")
Syntax
<Result> = EventWait(<Event> [, <Maximum duration>])
<Result>: Integer
  • 1 if the event was received by the thread,
  • 0 otherwise (maximum duration exceeded).
<Event>: Character string (with quotes), or AutomaticEvent or ManualEvent variable
  • Name of the event to wait for. If this event does not exist, it is automatically created with the default options (automatic mode) and closed.
  • Versions 20 and later
    WINDEVWEBDEV - Server codeiPhone/iPadApple WatchWindows MobileUniversal Windows 10 App Name of the AutomaticEvent variable that corresponds to the event to wait for.
    New in version 20
    WINDEVWEBDEV - Server codeiPhone/iPadApple WatchWindows MobileUniversal Windows 10 App Name of the AutomaticEvent variable that corresponds to the event to wait for.
    WINDEVWEBDEV - Server codeiPhone/iPadApple WatchWindows MobileUniversal Windows 10 App Name of the AutomaticEvent variable that corresponds to the event to wait for.
  • Versions 20 and later
    WINDEVWEBDEV - Server codeiPhone/iPadApple WatchWindows MobileUniversal Windows 10 App Name of the ManualEvent variable that corresponds to the event to wait for.
    New in version 20
    WINDEVWEBDEV - Server codeiPhone/iPadApple WatchWindows MobileUniversal Windows 10 App Name of the ManualEvent variable that corresponds to the event to wait for.
    WINDEVWEBDEV - Server codeiPhone/iPadApple WatchWindows MobileUniversal Windows 10 App Name of the ManualEvent variable that corresponds to the event to wait for.
<Maximum duration>: Optional integer or optional Duration
Maximum time-out in hundredths of a second.
  • If no event was received by the thread before the end of specified duration, <Result> is equal to False.
  • The time-out is endless if this parameter is not specified.
  • If this parameter is set to 0, <Result> corresponds to the status of the event, without waiting.
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).
Remarks
You can end the execution of a thread even if it is locked in an endless wait for an event. Simply use ThreadStop.
Component : wd240vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment