Pigweed
|
#include <virtual_basic_lockable.h>
Public Member Functions | |
void | lock () |
void | unlock () |
Protected Types | |
enum class | Operation { kLock , kUnlock } |
The VirtualBasicLockable
is a virtual lock abstraction for locks which meet the C++ named BasicLockable requirements of lock() and unlock().
This virtual indirection is useful in case you need configurable lock selection in a portable module where the final type is not defined upstream and ergo module configuration cannot be used or in case the lock type is not fixed at compile time, for example to support run time and crash time use of an object without incurring the code size hit for templating the object.