PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Mode for sharing the 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
Creates a signal. A signal is used to synchronize several threads at the same time. If the signal is opened, all the threads waiting for the signal are unlocked.
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
EventCreate(<Signal Name> [, <Mode> [, <Initial Status> [, <Options>]]])
<Signal Name>: Character string (with quotes)
Name of the signal to create. This name will be used by all the functions for signal management.
<Mode>: Optional constant
Mode for managing the signal:
eventAutomatic
(Default value)
After its opening, the signal is automatically closed as soon as a single thread is unlocked.
eventManualThe signal is modified by EventChange.
<Initial Status>: Optional constant
Initial status of signal:
eventOpenThe signal is opened when it is created.
eventClose
(Default value)
The signal is closed during its creation.
<Options>: Optional Integer constant
  • Mode for sharing the signal:
    shareNoneThe signal is specific to the application. If EventDestroy is not called, the signal is destroyed at the end of the application.
    AndroidAndroid Widget iPhone/iPadApple WatchJava The signals are unique for the application that created them. They cannot be shared between several applications.
    shareGlobalThe signal is shared between all the applications found on the computer.
    AndroidAndroid Widget iPhone/iPadApple WatchJava This constant is not available.
    shareUser
    (Default value)
    The signal is shared between all the applications of the session of the user who runs the application.
    AndroidAndroid Widget iPhone/iPadApple WatchJava This constant is not available.
Versions 17 and later
  • Mode for destroying the signal:
    Versions 17 and later
    DestructionWithoutModification
    New in version 17
    DestructionWithoutModification
    DestructionWithoutModification
    By default, a signal is automatically modified during its destruction. If the signal is created with the DestructionWithoutModification constant, it will not be modified during the call to EventDestroy or during the automatic destruction of the signal when closing the application.
    AndroidAndroid Widget Java This constant is not available.
The information regarding the share mode and the destruction mode of the signal can be combined.
New in version 17
  • Mode for destroying the signal:
    Versions 17 and later
    DestructionWithoutModification
    New in version 17
    DestructionWithoutModification
    DestructionWithoutModification
    By default, a signal is automatically modified during its destruction. If the signal is created with the DestructionWithoutModification constant, it will not be modified during the call to EventDestroy or during the automatic destruction of the signal when closing the application.
    AndroidAndroid Widget Java This constant is not available.
The information regarding the share mode and the destruction mode of the signal can be combined.
  • Mode for destroying the signal:
    Versions 17 and later
    DestructionWithoutModification
    New in version 17
    DestructionWithoutModification
    DestructionWithoutModification
    By default, a signal is automatically modified during its destruction. If the signal is created with the DestructionWithoutModification constant, it will not be modified during the call to EventDestroy or during the automatic destruction of the signal when closing the application.
    AndroidAndroid Widget Java This constant is not available.
The information regarding the share mode and the destruction mode of the signal can be combined.
Remarks
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUniversal Windows 10 AppAjaxUser code (UMC)

Mode for sharing the signals

In shareUser mode, the signal is shared between all the applications of the session of the user who runs the application.
  • The signal is created by the first application of the session of the user who calls EventCreate.
  • The following applications that call EventCreate connect to the existing semaphore.
  • The last application that is closed destroys the signal.
  • A signal with the same name cannot be used by a session of another user on the same computer: the system returns an error of access rights.
In shareGlobal mode, the signal is shared among all the applications found on the computer.
  • The signal is created by the first application that calls EventCreate.
  • The following applications that call EventCreate connect to the existing semaphore.
  • The last application that is closed destroys the signal.
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