ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Process functions / Threads, semaphores, signals and mutex
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
CriticalSection (Variable type)
In french: SectionCritique
CriticalSection variables are used to define critical sections to limit the simultaneous execution of a code (procedure, line of code, etc.) to one thread at a given moment in an application.
Note: For more details on declaring this type of variable, see Declaring a variable.
Example
// Déclaration
//----------------
S is CriticalSection

// Utilisation pour un bloc de code
//---------------------------
USING S IN
	// code protégé par la section critique
	// un seul thread pourra exécuter ce code à un moment donné
END
Remarks
  • The CriticalSection type is used to simplify the declaration of critical sections.
  • CriticalSection variables respect the rules for variable scope.
  • A block of code can be protected with a critical section via the syntax USE ... IN.
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help