19 operator bool()
const {
return _locked; }
20 void unlock() { assert(_locked);
if (_locked) { _lock.unlock(); _locked =
false;} }
21 void lock() { assert(!_locked);
if (!_locked) { _lock.lock(); _locked =
true; } }
41 #define synchronized(X) fc::unique_lock<decltype((X))> __lock(((X)));