AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de gestión de procesos / Hilos, semáforos, señales y mutex
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Opens a synchronization event between several threads.
Ejemplo
// 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")
Sintaxis
<Event>.Open()
<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
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 24
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local