diff options
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/thread.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/zencore/include/zencore/thread.h b/zencore/include/zencore/thread.h index 46b251e07..d27d0f189 100644 --- a/zencore/include/zencore/thread.h +++ b/zencore/include/zencore/thread.h @@ -102,6 +102,21 @@ public: ZENCORE_API explicit NamedEvent(std::u8string_view EventName); }; +/** Basic abstraction of a named (system wide) mutex primitive + */ +class NamedMutex +{ +public: + ~NamedMutex(); + + ZENCORE_API [[nodiscard]] bool Create(std::string_view MutexName); + + ZENCORE_API static bool Exists(std::string_view MutexName); + +private: + void* m_MutexHandle = nullptr; +}; + /** Basic process abstraction */ class Process |