System::Threading::Mutex::WaitOne method

Mutex::WaitOne() method

Locks mutex. Performs unlimited waiting if neccessary.

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

ReturnValue

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

See Also

Mutex::WaitOne(int) method

Locks mutex. Performs waiting if neccessary.

virtual bool System::Threading::Mutex::WaitOne(int millisecondsTimeout) override
ParameterTypeDescription
millisecondsTimeoutintWaiting timeout in milliseconds.

ReturnValue

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

See Also

Mutex::WaitOne(TimeSpan) method

Locks mutex. Performs waiting if neccessary.

virtual bool System::Threading::Mutex::WaitOne(TimeSpan timeout) override
ParameterTypeDescription
timeoutTimeSpanA System::TimeSpan that represents the number of milliseconds to wait, or a System::TimeSpan that represents -1 milliseconds to wait indefinitely.

ReturnValue

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

See Also