: Attempts to obtain ownership of the mutex for the calling thread without
If ownership is not obtained, there is no effect and try_lock()
An implementation may fail to obtain the lock even if it is not
held by any other thread.
This spurious failure is normally uncommon, but
allows interesting implementations based on a simple
compare and exchange ([atomics]
— end note
An implementation should ensure that try_lock()
does not consistently return false
in the absence of contending mutex acquisitions.