|
Boost : |
From: Lee Brown (lee_at_[hidden])
Date: 2002-01-16 00:58:28
class Lock {
public:
Lock(mutex& m) : m_(m) {
disable_cancel();
m_.lock();
push_cleanup(m_ , &m::unlock);
enable_cancel();
}
~Lock() {
disable_cancel();
pop_cleanup();
enable_cancel();
}
};
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk