ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Process functions / Threads, semaphores, signals and mutex
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Opens a synchronization event between several threads.
Example
// Création d'un signal
AllezY is AutomaticEvent

// Exécution d'un premier thread
ThreadExecute("Thread1", threadNormal, "Thread_Premier")
// Bloque le thread en cours jusqu'à l'obtention du signal
ThreadWaitSignal()

// Exécution d'un second thread
ThreadExecute("Thread2", threadNormal, "Thread_Second")
// Bloque le thread en cours jusqu'à l'obtention du signal
ThreadWaitSignal()

// Ouvre le signal pour exécuter les threads
EventOpen(AllezY)
PROCEDURE Thread_Premier()
Trace(dbgInfo(dbgProcess) + " - ThreadEnvoieSignal(threadPrincipal)")
ThreadSendSignal(threadMain)
EventWait(Allezy)
Trace(dbgInfo(dbgProcess) + " - Signal reçu")
PROCEDURE Thread_Second()
Trace(dbgInfo(dbgProcess) + " - ThreadEnvoieSignal(threadPrincipal)")
ThreadSendSignal(threadMain)
EventWait(Allezy)
Trace(dbgInfo(dbgProcess) + " - Signal reçu")
Syntax
EventOpen(<Event>)
<Event>: Character string, or AutomaticEvent or ManualEvent variable
Name of the event to open. This name can correspond to:
Remarks
  • This function is equivalent to the following syntax of EventChange:
    SignalModifie(<Signal>, signalOuvert)
  • Case of an automatic signal: The signal lets a single thread through.
    The event is automatically closed once the thread is processed.
    • Waiting threads: If no thread was waiting, the signal remains open until the next thread passes, then closes again..
    • New threads: If other threads arrive, they are put on hold.
  • Case of a manual signal: Signal goes to open state.
    • Waiting threads: All waiting threads pass through.
    • New threads: If other threads arrive while the signal is still open, they pass.
Business / UI classification: Neutral code
Component: wd300vm.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help