template <void (*Lock)(), void (*Unlock)()>
struct WeakLock
Defined at line 118 of file ../../sdk/lib/c/threads/../dlfcn/../weak.h
This meets the C++ BasicLockable named requirement with a pair of void()
functions that constitute one lock, and can both be weak undefined symbols.
Despite the name, this is also fine to use with symbols that haven't been
declared weak. The Weak::Call machinery should compile away to the trivial
tail calls since the comparison will be considered statically tautological.
WeakLock instantiations are empty objects, so there only needs to be one.
Each one can be declared and used somewhere as:
```
constexpr WeakLock
<
...> kSomeLock;
T gSomeLockedThing __TA_GUARDED(kSomeLock);
...
std::lock_guard lock(kSomeLock);
gSomeLockedThing.DoThingWhileLocked();
```
This can be used directly in ``.
Public Methods
void lock ()
Defined at line 119 of file ../../sdk/lib/c/threads/../dlfcn/../weak.h
void unlock ()
Defined at line 120 of file ../../sdk/lib/c/threads/../dlfcn/../weak.h