|
|
|
|
<AutomaticEvent variable>.Open (Function) In french: <Variable SignalAutomatique>.Ouvre Opens a synchronization event between several threads. // Create an event Event_Letsgo is AutomaticEvent(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") Syntax <Event>: AutomaticEvent variable Name of a variable of type AutomaticEvent to be opened. Remarks - This function is equivalent to the following syntax of EventChange:
EventChange(<Event>, eventOpen) - For an automatic event: A single thread is processed by the event.
The event is automatically closed once the thread is processed. - Pending threads: If there is no pending thread, the event remains open until the next thread, then it is closed.
- New threads: The new threads are added to the pending queue.
Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|