|
|
|
|
Abre una sincronización Event entre varios hilos. // Create an event Event_Letsgo is ManualEvent(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() // Opens the event to run the threads Event_Letsgo.Open()
PROCEDURE Thread_First() Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)") ThreadSendSignal(threadMain) Event_Letsgo.Wait() Trace(dbgInfo(dbgProcess) + " - Event received") PROCEDURE Thread_Second() Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)") ThreadSendSignal(threadMain) Event_Letsgo.Wait() Trace(dbgInfo(dbgProcess) + " - Event received") Sintaxis <Event>: ManualEvent Variable Nombre de una Variable de tipo ManualEvent que se va a abrir. Observaciones - Esta función equivale a la siguiente sintaxis de EventChange:
EventChange(<Event>, eventOpen) - Para un evento manual: El evento se abre.
- Hilos pendientes: Se procesan todos los hilos pendientes.
- Temas nuevos: Si llegan otros hilos mientras la Event está todavía abierta, se procesan.
Clasificación Lógica de negocio / UI: Código neutro
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|