Nana C++ Library An open-source C++ framework project The Programmer's Guide |
||||||||
nana::threads::lock_guard<typename Mutex> Description The class lock_guard maintains the ownership of a mutex object through the lock_guard's object lifetime. Model of None Public base classes None Template Parameters
Typedefs
Members
File nana/threads/mutex.hpp Notes 1, Reacquires the ownership for a owned mutex, it throws the std::runtime_error to avoid a deadlock. nana::threads::recursive_mutex mtx; void thread() { using namespace nana::threads; lock_gaurd<mutex> lock(mtx); //Synchronized } int main() { thread(); } See also None. Move to The Nana Programmer's Guide Main Page |
||||||||