MCPcopy Create free account
hub / github.com/cztomczak/cefpython / AutoUnlock

Class AutoUnlock

src/include/base/cef_lock.h:146–159  ·  view source on GitHub ↗

AutoUnlock is a helper that will Release() the |lock| argument in the constructor, and re-Acquire() it in the destructor.

Source from the content-addressed store, hash-verified

144// AutoUnlock is a helper that will Release() the |lock| argument in the
145// constructor, and re-Acquire() it in the destructor.
146class AutoUnlock {
147 public:
148 explicit AutoUnlock(Lock& lock) : lock_(lock) {
149 // We require our caller to have the lock.
150 lock_.AssertAcquired();
151 lock_.Release();
152 }
153
154 ~AutoUnlock() { lock_.Acquire(); }
155
156 private:
157 Lock& lock_;
158 DISALLOW_COPY_AND_ASSIGN(AutoUnlock);
159};
160
161} // namespace cef_internal
162

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected