PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Opens a synchronization signal between several threads.
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 a signal
LetsGo is eventAutomatic

// Run a first thread
ThreadExecute("Thread1", threadNormal, "Thread_First")
// Locks the current thread until the signal is obtained
ThreadWaitSignal()

// Run a second thread
ThreadExecute("Thread2", threadNormal, "Thread_Second")
// Locks the current thread until the signal is obtained
ThreadWaitSignal()

// Opens the signal to run the threads
EventOpen(LetsGo)
//----------------------------------------------
PROCÉDURE Thread_First()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("LetsGo")
Trace(dbgInfo(dbgProcess) + " - Signal received")
//--------------------------------------------
PROCÉDURE Thread_Second()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("LetsGo")
Trace(dbgInfo(dbgProcess) + " - Signal received")
Syntax
EventOpen(<Signal>)
<Signal>: Character string, or AutomaticEvent or ManualEvent variable
Name of the signal to open. This name can correspond to:
Remarks
  • This function is equivalent to the following syntax of EventChange:
    EventChange(<Signal>, eventOpen)
  • For an automatic signal: A single thread is processed by the signal.
    The signal is automatically closed once the thread is processed.
    • Pending threads: If there is no pending thread, the signal remains opened until the next thread, then it is closed.
    • New threads: The new threads are added to the pending queue.
  • For a manual signal: The signal is opened.
    • Pending threads: All the pending threads are processed.
    • New threads: If other threads arrive while the signal is still opened, they are processed.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Linux wd230vm.so
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment