|
|
|
|
|
<Thread>.SendSignal (Function) In french: <Thread>.EnvoieSignal The current thread sends an event to the specified thread in order to unlock it. This function simplifies the synchronization between threads without having to implement an advanced management of events. Reminder: - A thread is a process run in parallel with the current application (main thread). This allows you to run a task in the background (e.g. backup, etc.).
- ThreadWaitSignal and <Thread>.SendSignal are used to synchronize the threads two by two.
EventCreate("Allez-y", eventManual, eventClose)
Thread1 is Thread(Thread_Premier)
ThreadExecute(Thread1)
ThreadWaitSignal()
Thread2 is Thread(Thread_Second)
ThreadExecute(Thread2)
ThreadWaitSignal()
EventChange("Allez-y", eventOpen)
PROCEDURE Thread_Premier()
Trace(dbgInfo(dbgProcess) + " - ThreadEnvoieSignal(threadPrincipal)")
ThreadSendSignal(threadMain)
EventWait("Allez-y")
Trace(dbgInfo(dbgProcess) + " - Signal reçu")
PROCEDURE Thread_Second()
Trace(dbgInfo(dbgProcess) + " - ThreadEnvoieSignal(threadPrincipal)")
ThreadSendSignal(threadMain)
EventWait("Allez-y")
Trace(dbgInfo(dbgProcess) + " - Signal reçu")
Syntax Remarks Synchronizing threads ThreadWaitSignal and <Thread>.SendSignal are used to synchronize the threads two by two. To synchronize several threads on the same event, the event functions must be used: Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|