WaitSemaphore()

语法

WaitSemaphore(Semaphore)
概要
Decreases the internal count of the semaphore by one, blocking thread execution if the count would fall below zero. A blocked thread is resumed as soon as another thread calls SignalSemaphore().

参数

Semaphore The semaphore to wait for.

返回值

无.

Remarks

The semaphore count is limited to a signed 32-bit value, so a maximum of 2147483647 WaitSemaphore() calls can be made without being balanced by SignalSemaphore() calls in between.

See CreateSemaphore() for a code example.

已支持操作系统

所有

<- UnlockMutex() - Thread Index - WaitThread() ->