|
|
|
|
Abre una sincronización Event entre varios hilos. // Create an eventLetsGo is eventAutomatic // 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 EventOpen(LetsGo)
PROCEDURE Thread_First()Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)") ThreadSendSignal(threadMain) EventWait("LetsGo") Trace(dbgInfo(dbgProcess) + " - Event received")
PROCEDURE Thread_Second()Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)") ThreadSendSignal(threadMain) EventWait("LetsGo") Trace(dbgInfo(dbgProcess) + " - Event received")
Sintaxis <Event>: Cadena de caracteres, o AutomaticEvent o ManualEvent Variable Nombre de la Event a abrir. Este nombre puede corresponder a: Observaciones - Esta función equivale a la siguiente sintaxis de EventChange:
EventChange(<Event>, eventOpen) - Para un automatic Event: Un solo hilo es procesado por la Event.
La Event se cierra automáticamente una vez que se procesa la el hilo. - Hilos pendientes: Si no hay ningún Thread pendiente, el Event permanece abierto hasta el próximo Thread, entonces se cierra..
- Temas nuevos: Los nuevos temas se añaden a la cola de espera.
- 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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|