|
|
|
|
|
EventWait (Function) In french: SignalAttend Locks the current thread while waiting for the specified event to be opened.
// Create an event EventCreate("Let's go", eventAutomatic, 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
<Result> = EventWait(<Event> [, <Maximum duration>])
Remarks You can end the execution of a thread even if it is locked in an endless wait for an event. Simply use ThreadStop.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|