116 ReadLock() : p(nullptr), owns(false) { }
118 ReadLock(
Latch& latch) : p(&latch), owns(true) { latch.lock_shared(); }
121 ReadLock(Latch& latch, adopt_lock_t) : p(&latch), owns(true) { }
131 void swap(ReadLock& rl)
141 bool owns_lock()
const
148 if (!owns && p !=
nullptr)
166 if (!owns && p !=
nullptr)
168 owns = p->try_lock_shared();
173 ReadLock(
const ReadLock& other) =
delete;
174 ReadLock& operator=(
const ReadLock& other) =
delete;