News for hackers. Stuff that matters.
Re:In the C++ bag of tricks: scoped locks by ef47d35620c1 on Friday February 07, 2014 @12:18PM (#7197391)
C++11 has scoped locks built-in, doesn't it?
Re:In the C++ bag of tricks: scoped locks by steve-howard on Friday February 07, 2014 @12:43PM (#7197555)
It offers a variety of them, simplest of which is lock_guard:

http://en.cppreference.com/w/cpp/thread/lock_guard