Lines Matching refs:Lock
16 /// A simple wrapper around a platform-specific lock. See also AutoLock.
17 class Lock {
19 /// Creates a lock in the "not held" state.
20 Lock();
22 /// Destroys the lock.
23 ~Lock();
25 /// Acquires the lock, blocking if it's already held by a different thread.
26 /// The lock must not already be held on the current thread (i.e. recursive
30 /// acquire and release the lock.
33 /// Releases the lock. This must be paired with a call to Acquire().
46 Lock(const Lock&);
47 Lock& operator=(const Lock&);
50 /// A helper class that scopes holding a lock.
56 /// pp::AutoLock lock(lock_);
57 /// ...do something with the lock held...
61 /// pp::Lock lock_;
66 explicit AutoLock(Lock& lock) : lock_(lock) {
75 Lock& lock_;