ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Process functions / Threads, semaphores, signals and mutex
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
CriticalSection (Type of variable)
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.
Remark: For more details on the declaration of this type of variable, see Declaring a variable.
Example
// Declaration
//----------------
S is CriticalSection
 
// Use for a code block
//---------------------------
USING S IN
// code protected by the critical section
// only one thread will execute this code at a given moment
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 USING ... IN.
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help