|
contur2
|
Common interface for synchronization primitives. More...
#include <i_sync_primitive.h>

Public Member Functions | |
| virtual | ~ISyncPrimitive ()=default |
| virtual Result< void > | acquire (ProcessId pid)=0 |
| Attempts to acquire the primitive for a process. | |
| virtual Result< void > | release (ProcessId pid)=0 |
| Releases the primitive for a process. | |
| virtual Result< void > | tryAcquire (ProcessId pid)=0 |
| Attempts non-blocking acquire. | |
| virtual std::string_view | name () const noexcept=0 |
| Human-readable primitive name. | |
Common interface for synchronization primitives.
Definition at line 14 of file i_sync_primitive.h.
|
virtualdefault |
Attempts to acquire the primitive for a process.
| pid | Caller process ID. |
Implemented in contur::CriticalSection, contur::Mutex, and contur::Semaphore.
|
nodiscardpure virtualnoexcept |
Human-readable primitive name.
Implemented in contur::CriticalSection, contur::Mutex, and contur::Semaphore.
Releases the primitive for a process.
| pid | Releasing process ID. |
Implemented in contur::CriticalSection, contur::Mutex, and contur::Semaphore.
Attempts non-blocking acquire.
| pid | Caller process ID. |
Implemented in contur::CriticalSection, contur::Mutex, and contur::Semaphore.