PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV, WEBDEV, WINDEV Mobile 24 feature!
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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.
Note: See Declaring a variable for more details on the declaration of this type of variable.
Example
// Declaration
//----------------
S is CriticalSecion

// 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 required version
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment