Template:cpp/thread/mutex/try lock

Tries to lock the mutex. Returns immediately. On successful lock acquisition returns, otherwise returns.

This function is allowed to fail spuriously and return even if the mutex is not currently locked by any other thread.

Prior unlock operation on the same mutex synchronizes-with (as defined in std) this operation if it returns. Note that prior lock does not synchronize with this operation if it returns.

Parameters
(none)

Return value
if the lock was acquired successfully, otherwise.

Exceptions
Throws nothing.