sprint 1-alpha
|
#include <mutex.h>
Public Member Functions | |
scoped_lock (T &m) | |
ctor: lock the resource | |
~scoped_lock () | |
dtor: unlock the resource |
scope lock design pattern
sprint::scoped_lock<sprint::mutex> l(mutex); sprint::mutex::scoped_lock l(mutex);