chsvlib
chsv helper source code

◆ shared_lock() [4/5]

shared_lock ( mutex_type m,
std::try_to_lock_t  t 
)

A constructor associating the specified shared_mutex with the shared_lock object. The constructor attempts to gain ownership of the mutex calling the shared_mutex::try_lock_shared method. Use the shared_lock::owns_lock method to acquire the result.

Parameters
mThe shared_mutex object to use.
tA tag to specify the behaviour of the constructor.