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
  • Summary table about the operating mode of event
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
Modifies the status of an event.
Ejemplo
// Create an event
EventCreate("Let's go", eventManual, 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()

// Modifies the event to run the threads
EventChange("Let's go", eventOpen)
//----------------------------------------------
PROCEDURE Thread_First()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Event received")
//--------------------------------------------
PROCEDURE Thread_Second()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Event received")
Sintaxis
EventChange(<Event> [, <New status>])
<Event>: Character string
Name of the event to modify. If this event does not exist, it is automatically created with the default options (automatic mode) and in the specified status.
<New status>: Optional constant
Status of the event:
eventCloseCloses the event.
This constant is equivalent to EventClose.
eventOpen
(Default value)
Opens the event. If threads are waiting for the event, they are automatically unlocked.
This constant is equivalent to EventOpen.
eventOpenAndCloseOpens the event, unlocks all the pending threads and closes the event. This constant is not recommended. It is kept for backward compatibility.
Observaciones

Summary table about the operating mode of event

Value of EventChangeAutomatic event (by default)Manual event
eventOpenA single thread is processed by the event.
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.
The event is opened.
Waiting threads: All waiting threads pass through.
New threads: If other threads arrive while the signal is still open, they pass.
eventOpenAndClose This constant is not recommended. It is kept for backward compatibility.A single thread is processed by the event.
The event is automatically closed once the thread is processed.
Waiting threads If no thread is waiting, the signal remains closed.
New threads If more threads arrive, they are put on hold.
All the threads are processed by the event.
The event is automatically closed once all the threads are processed.
New threads If more threads arrive, they are put on hold.
eventCloseThe event remains closed.
New threads If more threads arrive, they are put on hold.
The event is closed.
New threads If more threads arrive, they are put on hold.
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

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