void lock(); (since C++11)
Locks the mutex. If another thread has already locked the mutex, a call to lock will block execution until the lock is acquired.
If lock is called by a thread that already owns the mutex, the behavior is undefined: the program may deadlock, or, if the implementation can detect the deadlock, a resource_deadlock_would_occur error condition may be thrown.
Prior unlock() operation on the same mutex synchronizes-with (as defined in std::memory_order) this operation