SharedLockable provides a VirtualBasicLockable API which exercises the parent SharedMutex reader API.
A single SharedLockable may be shared across threads, but a thread must not recursively call lock() or unlock(). Doing so is undefined behavior.
Public Member Functions | |
| SharedLockable (LockT *parent) | |
| SharedLockable (const SharedLockable &)=delete | |
| SharedLockable (SharedLockable &&)=delete | |
| SharedLockable & | operator= (const SharedLockable &)=delete |
| SharedLockable & | operator= (SharedLockable &&)=delete |
Public Member Functions inherited from pw::sync::VirtualBasicLockable | |
| void | lock () |
| void | unlock () |
Private Member Functions | |
| void | DoLockOperation (Operation operation) final |
Additional Inherited Members | |
Protected Types inherited from pw::sync::VirtualBasicLockable | |
| enum class | Operation { kLock , kUnlock } |
|
inlinefinalprivatevirtual |
Uses a single virtual method with an enum to minimize the vtable cost per implementation of VirtualBasicLockable.
Implements pw::sync::VirtualBasicLockable.