CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CYBMutex.hpp
Go to the documentation of this file.
1 #pragma once
3 namespace CYB {
4  namespace Platform {
5  namespace System {
7  class Mutex : private Implementation::Mutex, public API::Mutex {
8  public:
15  Mutex();
17  Mutex(const Mutex&) = delete;
19  ~Mutex() final override;
20 
22  void Lock(void) noexcept final override;
24  bool TryLock(void) noexcept final override;
26  void Unlock(void) noexcept final override;
27  };
28  };
29  };
30 };
void Unlock(void) noexceptfinaloverride
Release a lock on a Mutex. Should only be called after a Lock or TryLock on the same Mutex was aquire...
void Lock(void) noexceptfinaloverride
Acquire a lock on a Mutex. This will block the current thread until the lock is aquired. The Mutex must not be owned by the current thread.
A fast locking, no order guaranteed, mutex.
Definition: Mutex.hpp:10
bool TryLock(void) noexceptfinaloverride
Attempt to acquire a lock on a Mutex. This will not block the current thread. The Mutex must not be o...
A fast locking, no order guaranteed, mutex.
Definition: CYBMutex.hpp:7
Contains the CRITICAL_SECTION struct.
~Mutex() finaloverride
Destroy a Mutex. Mutex must be unlocked.
Mutex()
Constructs a Mutex.