PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • What is a critical section?
  • Using critical sections
  • Various
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
Marks the end of critical section: the code will be run by another thread.
To mark the start of critical section, use CriticalSectionStart.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Versions 19 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 19
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
CriticalSectionStart()
// Two threads will not be able to run this code at the same time
...
CriticalSectionEnd()
Syntax

Ending a critical section on a code section Hide the details

CriticalSectionEnd([<Section Name>])
<Section Name>: Optional character string (with quotes)
Identifies the critical section.
Versions 21 and later
AndroidAndroid Widget Not available in Android and in Android Widget

Ending a critical section on a variable Hide the details

CriticalSectionEnd([<Variable Name>])
<Variable Name>: Character string (without quotes)
Name of WLanguage variable that was protected in a critical section by CriticalSectionStart.
New in version 21
AndroidAndroid Widget Not available in Android and in Android Widget

Ending a critical section on a variable Hide the details

CriticalSectionEnd([<Variable Name>])
<Variable Name>: Character string (without quotes)
Name of WLanguage variable that was protected in a critical section by CriticalSectionStart.
AndroidAndroid Widget Not available in Android and in Android Widget

Ending a critical section on a variable Hide the details

CriticalSectionEnd([<Variable Name>])
<Variable Name>: Character string (without quotes)
Name of WLanguage variable that was protected in a critical section by CriticalSectionStart.
Remarks

What is a critical section?

A critical section is a semaphore limited to a single thread on a single code section (process, procedure, ...).
Unlike the semaphores, a critical section can be used once only.
For example, a critical section can be used to protect a procedure for updating the window controls.
The start of critical section is signaled by CriticalSectionStart. A name can be given to this critical section
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUniversal Windows 10 AppAjaxUser code (UMC)

Using critical sections

To use critical sections, change the management mode of threads via ThreadMode (associated with the threadCriticalSection constant).
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUniversal Windows 10 AppAjaxUser code (UMC)

Various

Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment