CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Mutex.hpp
Go to the documentation of this file.
1 #pragma once
3 namespace CYB {
4  namespace API {
10  class Mutex : public Interop::Allocatable {
11  public:
17  public:
19  virtual ~Mutex() = default;
25  virtual void Lock(void) noexcept = 0;
32  virtual bool TryLock(void) noexcept = 0;
38  virtual void Unlock(void) noexcept = 0;
39  };
40  };
41 };
43 CYB_SET_ALLOCATABLE_ID(Mutex);
44 //! @endcond
virtual bool TryLock(void) noexcept=0
Attempt to acquire a lock on a Mutex. This will not block the current thread. The Mutex must not be o...
virtual void Unlock(void) noexcept=0
Release a lock on a Mutex. Should only be called after a Lock or TryLock on the same Mutex was aquire...
Used as a base class by all constructors.
Definition: Constructor.hpp:56
virtual void Lock(void) noexcept=0
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.
Constructor< void > EmptyConstructor
Constructor<void> alias.
virtual ~Mutex()=default
Destroy a Mutex. Mutex must be unlocked.
A fast locking, no order guaranteed, mutex.
Definition: Mutex.hpp:10
Defines the base class for allocatable engine objects.
Definition: Allocatable.hpp:7