recursive_timed_mutex::try_lock Method

Attempts to obtain ownership of the mutex without blocking.

bool try_lock() _NOEXCEPT;

true if the method successfully obtained ownership of the mutex or if the calling thread already owns the mutex; otherwise, false.

If the calling thread already owns the mutex, the function immediately returns true, and the previous lock remains in effect.

Header: mutex

Namespace: std

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft