CyberEngineMkIII
|
A reliable wait queue. More...
#include <Semaphore.hpp>
Public Types | |
using | Constructor = Interop::EmptyConstructor |
See Interop Construction. More... | |
![]() | |
enum | ID { ID::NULL_ID, ID::File, ID::Mutex, ID::Path, ID::Semaphore } |
Defines the IDs of allocatable engine objects. More... | |
using | Constructor = NullConstructor |
Override in descendants. | |
using | CopyConstructor = NullConstructor |
Override in descendants. | |
Public Member Functions | |
virtual | ~Semaphore ()=default |
Destroy a Semaphore. Semaphore must have no waiters. | |
virtual void | SignalN (const unsigned long long AN) noexcept=0 |
Signal N waiters of this semaphore. Will not signal more than are currently waiting. More... | |
virtual void | SignalAll (void) noexcept=0 |
Signal all current waiters of this semaphore. More... | |
virtual void | Wait (void) noexcept=0 |
Wait indefinitely for a signal from this semaphore. Will be placed last into the queue. More... | |
![]() | |
virtual | ~Allocatable ()=default |
See Default Constructors and Destructor. | |
Additional Inherited Members | |
![]() | |
template<class AParent > | |
static constexpr ID | GetID (void) |
Returns the ID of an allocatable object. More... | |
A reliable wait queue.
Definition at line 9 of file Semaphore.hpp.
See Interop Construction.
CYB::Exception::SystemData | Error code: CYB::Exception::SystemData::MUTEX_INITIALIZATION_FAILURE Thrown if the internal mutex could not be initialized |
Definition at line 15 of file Semaphore.hpp.
|
pure virtualnoexcept |
Signal all current waiters of this semaphore.
Implemented in CYB::Platform::System::Semaphore.
|
pure virtualnoexcept |
Signal N waiters of this semaphore. Will not signal more than are currently waiting.
AN | the number of waiters to wake |
Implemented in CYB::Platform::System::Semaphore.
|
pure virtualnoexcept |
Wait indefinitely for a signal from this semaphore. Will be placed last into the queue.
Implemented in CYB::Platform::System::Semaphore.