|
|
|
|
|
SignalOuvre (Fonction) En anglais : EventOpen Ouvre un signal de synchronisation entre plusieurs threads.
AllezY est un SignalAutomatique
ThreadExécute("Thread1", threadNormal, "Thread_Premier")
ThreadAttendSignal()
ThreadExécute("Thread2", threadNormal, "Thread_Second")
ThreadAttendSignal()
SignalOuvre(AllezY)
PROCÉDURE Thread_Premier()
Trace(dbgInfo(dbgTraitement) + " - ThreadEnvoieSignal(threadPrincipal)")
ThreadEnvoieSignal(threadPrincipal)
SignalAttend(Allezy)
Trace(dbgInfo(dbgTraitement) + " - Signal reçu")
PROCÉDURE Thread_Second()
Trace(dbgInfo(dbgTraitement) + " - ThreadEnvoieSignal(threadPrincipal)")
ThreadEnvoieSignal(threadPrincipal)
SignalAttend(Allezy)
Trace(dbgInfo(dbgTraitement) + " - Signal reçu")
Syntaxe <Signal> : Chaîne de caractères ou variable de type SignalAutomatique ou SignalManuel Nom du signal à ouvrir. Ce nom peut correspondre : Remarques - Cette fonction est équivalente à la syntaxe suivante de la fonction SignalModifie :
SignalModifie(<Signal>, signalOuvert) - Cas d'un signal automatique : Le signal laisse passer un seul thread.
Le signal se referme automatiquement après le passage du thread. - Threads en attente : Si aucun thread n'était en attente, le signal reste ouvert jusqu'au prochain thread qui passe, puis se referme.
- Nouveaux threads : Si d'autres threads arrivent, ils sont mis en attente.
- Cas d'un signal manuel : Le signal passe à l'état ouvert.
- Threads en attente : Tous les threads en attente passent.
- Nouveaux threads : Si d'autres threads arrivent alors que le signal est encore ouvert, ils passent.
Classification Métier / UI : Code neutre
Documentation également disponible pour…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|