PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Equivalence
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
Locks the current thread until the semaphore is opened (which means until a "free" spot becomes available in the protected section).
Reminder: The semaphores are used to define a protected code section that can only be run by a specific number of threads.
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.
Syntax
<Result> = SemaphoreStart(<Semaphore Name> [, <Maximum Time-out>])
<Result>: Boolean
  • True if the thread is allowed to enter in the code section,
  • False otherwise (maximum duration reached).
<Semaphore Name>: Character string (with quotes)
Name of semaphore to use. If the semaphore does not exist, it is created with the default options (see SemaphoreCreate)
<Maximum Time-out>: Optional integer or optional duration
Maximum time-out in hundredths of a second.
  • At the end of the specified duration, if the thread did not receive the authorization, <Result> is set to False.
  • If this parameter is not specified or if it corresponds to the Infinite constant, the wait is infinite.
  • If this parameter is set to 0, <Result> corresponds to the status of the semaphore. The thread is not pending.
This parameter can correspond to:
  • an integer corresponding to the number of hundredths of a second,
  • a Duration variable,
  • Versions 23 and later
    the direct indication of duration (1 s or 10 ms for example).
    New in version 23
    the direct indication of duration (1 s or 10 ms for example).
    the direct indication of duration (1 s or 10 ms for example).
Remarks

Equivalence

SemaphoreStart("SemaphoreName")
is equivalent to:
CriticalSectionStart("MyCriticalSection")
Indeed, by default, SemaphoreStart creates a semaphore limited to a single thread.
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