Menu

#666 The CreateSemaphore documentation do not seems to be correct

v1.0 (example)
open
nobody
None
5
2014-08-26
2014-02-28
No

CreateSemaphore wrap:

HANDLE WINAPI CreateSemaphore(
In_opt LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
In LONG lInitialCount,
In LONG lMaximumCount,
In_opt LPCTSTR lpName
);

It should probably be something like:

win32event.CreateSemaphore
PyHANDLE = CreateEvent(sa, initialCount, lMaximumCount, semaphoreName )

Creates a waitable event

Parameters

sa : PySECURITY_ATTRIBUTES

The security attributes, or None

initialCount : int

initial count

lMaximumCount: int

maximum count

semaphoreName : PyIUnicode

semaphore-object name, or None

Return Value
The result is a handle to the created object

instead of:

PyHANDLE = CreateSemaphore(initialCount, semaphoreName , bManualReset )

Creates a Semaphore

Parameters

initialCount : int

initial count

semaphoreName : PyIUnicode

semaphore-object name, or None

bManualReset : int

flag for manual reset state

Return Value
The result is a handle to the created object

Discussion