PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Summary table about the operating mode of signals
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
Modifies the status of a signal.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 17
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the 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 the iPhone/iPad applications.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
New in version 19
iPhone/iPad This function is now available for the iPhone/iPad applications.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the 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 a signal
EventCreate("Let's go", eventManual, eventClose)
// 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()

// Modifies the signal to run the threads
EventChange("Let's go", eventOpen)
//----------------------------------------------
PROCÉDURE Thread_First()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Signal received")
//--------------------------------------------
PROCÉDURE Thread_Second()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Signal received")
Syntax
EventChange(<Signal Name> [, <New Status>])
<Signal Name>: Character string (with quotes)
Name of the signal to modify. If this signal does not exist, the signal is automatically created with the default options (automatic mode) and in the specified status.
<New Status>: Optional constant
Status of the signal:
eventOpen
(Default value)
Opens the signal. If threads are waiting for the signal, they are automatically unlocked.
Versions 20 and later
This constant is equivalent to EventOpen.
New in version 20
This constant is equivalent to EventOpen.
This constant is equivalent to EventOpen.
eventCloseCloses the signal.
Versions 20 and later
This constant is equivalent to EventClose.
New in version 20
This constant is equivalent to EventClose.
This constant is equivalent to EventClose.
eventOpenAndCloseOpens the signal, unlocks all the pending threads and closes the signal.
This constant is not recommended. It is kept for backward compatibility.
Remarks

Summary table about the operating mode of signals

Value of EventChangeAutomatic signal (by default)Manual signal
eventOpenA 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.
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.
eventOpenAndClose
This constant is not recommended. It is kept for backward compatibility.
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 closed.
New threads: The new threads are added to the pending queue.
All the threads are processed by the signal.
The signal is automatically closed once all the threads are processed.
New threads: The new threads are added to the pending queue.
eventCloseThe signal remains closed.
New threads: The new threads are added to the pending queue.
The signal is closed.
New threads: The new threads are added to the pending queue.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment