PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Locks the current thread while waiting for the specified event to be opened.
Versions 19 and later
WINDEVLinux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WEBDEV sites in Linux.
New in version 19
WINDEVLinux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WEBDEV sites in Linux.
WINDEVLinux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WEBDEV sites in Linux.
Example
// Create an event
Event_Letsgo is ManualEvent(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()
 
// Opens the event to run the threads
Event_Letsgo.Open()
PROCEDURE Thread_First()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
Event_Letsgo.Wait()
Trace(dbgInfo(dbgProcess) + " - Event received")
PROCEDURE Thread_Second()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
Event_Letsgo.Wait()
Trace(dbgInfo(dbgProcess) + " - Event received")
Syntax
<Result> = <Event>.Wait([<Maximum duration>])
<Result>: Integer
  • 1 if the event was received by the thread,
  • 0 otherwise (maximum duration exceeded).
<Event>: ManualEvent variable
Name of the ManualEvent variable that corresponds to the event to wait for.
<Maximum duration>: Optional integer or optional Duration
Maximum timeout in hundredths of a second.
  • If no signal was received by the thread before the end of specified duration, <Result> is equal to False.
  • The timeout 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 duration in a readable format (e.g., 1 s or 10 ms).
    New in version 23
    the duration in a readable format (e.g., 1 s or 10 ms).
    the duration in a readable format (e.g., 1 s or 10 ms).
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: wd270vm.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment