|
|
|
|
- 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.
EventCreate("Let's go", eventManual, eventClose)
ThreadExécute("Thread1", threadNormal, "Thread_First")
ThreadWaitSignal()
ThreadExécute("Thread2", threadNormal, "Thread_Second")
ThreadWaitSignal()
EventChange("Let's go", eventOpen)
PROCÉDURE Thread_First()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Event received")
PROCÉDURE 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>]]])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|