ECSTASY
All in the name
Loading...
Searching...
No Matches
Lockable.hpp
Go to the documentation of this file.
1
11
12#ifndef ECSTASY_THREAD_LOCKABLE_HPP_
13#define ECSTASY_THREAD_LOCKABLE_HPP_
14
15#include <concepts>
16
17namespace ecstasy::thread
18{
29 template <typename L>
30 concept Lockable = requires(L &lockable) {
31 // clang-format off
32 { lockable.lock() } -> std::same_as<void>;
33 { lockable.unlock() } -> std::same_as<void>;
34 // clang-format on
35 };
36
37} // namespace ecstasy::thread
38
39#endif /* !ECSTASY_THREAD_LOCKABLE_HPP_ */
Defines a type that can be locked.
Definition Lockable.hpp:30
Namespace regrouping the thread safe ecstasy symbols.
Definition include.hpp:26