#pragma once #include #include "threading/sync/spinlock.hpp" template class Lockable { public: using lock_type = lock_t; std::lock_guard acquire_guard() const { return std::lock_guard(lock); } std::unique_lock acquire_unique() const { return std::unique_lock(lock); } mutable lock_t lock; };