|
|
|
|
|
<AutomaticEvent variable>Abrir (función) Opens a synchronization event between several threads.
Event_Letsgo is AutomaticEvent(eventClose)
ThreadExecute("Thread1", threadNormal, "Thread_First")
ThreadWaitSignal()
ThreadExecute("Thread2", threadNormal, "Thread_Second")
ThreadWaitSignal()
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>: Variable AutomaticEvent Name of a variable of type AutomaticEvent to be opened. Observaciones - This function is equivalent to the following syntax of EventChange:
EventChange(<Event>, eventOpen) - Case of an automation signal The signal lets a single thread through.
The event is automatically closed once the thread is processed. - Waiting threads If no thread was waiting, the signal remains open until the next thread passes, then closes again.
- New threads If more threads arrive, they are put on hold.
Clasificación Lógica de negocio / UI: Código neutro
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|