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
  • Miscellaneous
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
Marks the end of a critical section: another thread will be able to run the code.
To mark the start of critical section, use CriticalSectionStart.
WindowsLinuxiPhone/iPadApple Watch When the calls to CriticalSectionStart and CriticalSectionEnd are in the same section of the code, it is recommended to use the type CriticalSection and the syntax USE ... IN.
Example:
// Using a Critical Section variable
S is CriticalSection

// Use for a code block
//---------------------------
utiliser S IN
	// code protected by the critical section
	// only one thread will execute this code at a given moment
END
Ejemplo
WindowsLinuxiPhone/iPadApple Watch
// Critical section on a variable
t is array <critical section> of int
CriticalSectionStart(t)
// Operations on the array by one only thread at a time
CriticalSectionEnd(t)
// Use of a named critical section
CriticalSectionStart("MySection")
// Two threads will not be able to run this code at the same time
...
CriticalSectionEnd("MySection")
Sintaxis
WindowsLinuxiPhone/iPadApple Watch

Ending a CriticalSection on a code section: using the CriticalSection type Ocultar los detalles

CriticalSectionStart(<Critical section>)
<Critical section>: CriticalSection variable
Name of the CriticalSection variable used to identify the critical section.
WindowsLinuxiPhone/iPadApple Watch

Ending a critical section on a variable Ocultar los detalles

CriticalSectionEnd([<Variable name>])
<Variable name>: Any type
Name of WLanguage variable that was protected in a critical section by CriticalSectionStart. This variable must be defined with the attribute <critical section>.

Ending a named critical section on a code section Ocultar los detalles

CriticalSectionEnd([<Section name>])
<Section name>: Optional character string
Identifies the critical section.
Observaciones

Miscellaneous

  • For more details on critical sections, see Managing the critical sections.
  • If a thread is destroyed while it is found in a critical section, the critical section is automatically freed.
  • A single thread is allowed in all the sections with the same name.
  • If sections use a different name, a thread can run the code of one section while another thread runs the code of another section.
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