PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 19 and later
Linux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 19
Linux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Linux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App 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.
Component : wd240vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment