An object of type
scoped_lock controls the ownership of lockable objects
within a scope
. A
scoped_lock object maintains ownership of lockable
objects throughout the
scoped_lock object's
lifetime. The behavior of a program is undefined if the lockable objects referenced by
pm do not exist for the entire lifetime of the
scoped_lock
object
.