|
|
|
|
|
- Mode for sharing the semaphores
SemaphoreCreate (Function) In french: SémaphoreCrée 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.
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: | | shareGlobal | The semaphore is shared among all the applications found on the computer.
| shareNone | The semaphore is specific to the application. If SemaphoreDestroy is not called, the semaphore is destroyed at the end of the application.
| shareUser (default value) | The semaphore is shared among all the applications of the session of the user who is running the application.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|