Files
2026-08-07 23:44:35 +08:00

17 lines
327 B
C++

#pragma once
#include <concepts>
namespace adminive {
struct No_Lock {
void lock() noexcept {}
bool try_lock() noexcept {
return true;
}
void unlock() noexcept {}
};
template <class T>
concept Basic_Lock = std::default_initializable<T> && requires(T& value) {
value.lock();
value.unlock();
};
}