|
|
|
|
- Mode for sharing the events
EventCreate (Function) In french: SignalCrée Creates an event. An event is used to synchronize several threads at the same time. If the event is open, all the threads waiting for the event are unlocked.
// Create an event EventCreate("Let's go", eventManual, 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() // Modifies the event to run the threads EventChange("Let's go", eventOpen) //---------------------------------------------- PROCEDURE Thread_First() Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)") ThreadSendSignal(threadMain) EventWait("Let's go") Trace(dbgInfo(dbgProcess) + " - Event received") //-------------------------------------------- PROCEDURE Thread_Second() Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)") ThreadSendSignal(threadMain) EventWait("Let's go") Trace(dbgInfo(dbgProcess) + " - Event received") Syntax
EventCreate(<Event> [, <Mode> [, <Initial status> [, <Options>]]])
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|