Documentation Home

Construct a jss::generic_lock_guard instance that locks the supplied mutex.

template<typename Mutex>
explicit generic_lock_guard(Mutex& m);

Effects:

Constructs a jss::generic_lock_guard instance that references the supplied mutex. Calls m.lock().

Throws:

Any exceptions thrown by m.lock().

Postcondition:

*this owns a lock on m.

Header

#include <mutex>

See Also