Documentation Home

Construct a jss::scoped_lock instance that owns the lock on the supplied lockable objects.

scoped_lock(LockableTypes& ... m,std::adopt_lock_t);

Precondition:

The calling thread must own a lock on all the lockable objects in m.

Effects:

Constructs a jss::scoped_lock instance that references the supplied lockable objects and takes ownership of the lock on all the lockable objects in m held by the calling thread.

Throws:

Nothing.

Postcondition:

*this owns the lock on all the lockable objects in m held by the calling thread.

Header

#include <jss/guards.hpp>

See Also