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
Creates a semaphore.
Reminder Semaphores can be used to define a protected area of code that can only be executed by a specific number of threads.
Example
// Création d'un sémaphore
SemaphoreCreate("MonSémaphore", 3)
Syntax
SemaphoreCreate(<Semaphore name> [, <Authorization> [, <Use> [, <Options>]]])
<Semaphore name>: Character string
Name of the semaphore to create. This name will be used by all the functions for semaphore management.
<Authorization>: Optional integer
Number of concurrent threads allowed in the protected section. This parameter is set to 1 by default.
<Use>: Optional integer
Number of threads found in the section when creating the semaphore (0 by default).
<Options>: Optional Integer constant
Mode for sharing the semaphore:
shareGlobalThe semaphore is shared among all the applications found on the computer.
AndroidAndroid Widget iPhone/iPad This constant is not available.
shareNoneThe semaphore is specific to the application. If SemaphoreDestroy is not called, the semaphore is destroyed at the end of the application.
AndroidAndroid Widget iPhone/iPad The semaphores are unique for the application that created them. They cannot be shared between several applications.
shareUser
(default value)
The semaphore is shared among all the applications of the session of the user who is running the application.
AndroidAndroid Widget iPhone/iPad This constant is not available.
Remarks
Component: wd300vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help