|
|
|
|
- Modo para compartir los eventos
Crea un evento. Un Event se utiliza para sincronizar varios hilos al mismo tiempo. Si la Event está abierta, se desbloquean todos los hilos que esperan a la Event.
// 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")
Sintaxis
EventCreate(<Event> [, <Mode> [, <Initial status> [, <Options>]]])
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|