WaitOne()

Semaphore::WaitOne() method

Locks semaphore. Performs unlimited waiting if neccessary.

virtual bool System::Threading::Semaphore::WaitOne() override

Return Value

Always returns true as it does not return until semaphore is locked.

Semaphore::WaitOne(int) method

Locks semaphore. Performs waiting if neccessary.

virtual bool System::Threading::Semaphore::WaitOne(int millisecondsTimeout) override

Arguments

ParameterTypeDescription
millisecondsTimeoutintWaiting timeout in milliseconds.

Return Value

Returns true if semaphore was locked or false if timeout exceeded.

See Also