|
HydraHook
Direct3D and Core Audio hooking library for Windows
|
Once-per-hook announcement guard that can be re-armed. More...
#include <Engine.h>
Public Member Functions | |
| template<typename Fn> | |
| void | call (Fn &&fn) |
| Runs fn once until reset() is called; concurrent callers wait for the first. | |
| void | reset () |
| Re-arms the guard. | |
Once-per-hook announcement guard that can be re-armed.
Replaces function-local std::once_flag so a hook, unhook, rehook cycle announces each hook again. Zero-cost fast path is one acquire load.
|
inline |
Runs fn once until reset() is called; concurrent callers wait for the first.
Definition at line 61 of file Engine.h.
Referenced by HydraHookMainThread().
|
inline |
Re-arms the guard.
Definition at line 75 of file Engine.h.
Referenced by HookAnnouncements::reset_all().