|
VLink 2.0.0
A high-performance communication middleware
|
Named, cross-process counting semaphore backed by the OS IPC layer. More...
Go to the source code of this file.
Classes | |
| class | vlink::SysSemaphore |
| Named cross-process counting semaphore. More... | |
Namespaces | |
| namespace | vlink |
Named, cross-process counting semaphore backed by the OS IPC layer.
SysSemaphore wraps a named POSIX semaphore (on Linux/macOS) or a named Win32 semaphore to allow synchronisation between independent processes (or between processes and drivers) via a shared name in the OS namespace.
Lifecycle:
SysSemaphore object.attach(name) to create or open a named semaphore.acquire() / release() for P/V operations.detach(force) to close the handle. If force is true the semaphore is also removed from the OS namespace.detach() automatically.attach(). If the semaphore already exists in the OS namespace the constructor count is ignored and the existing value is used.Semaphore, this class may throw on attach() failures (e.g., permission denied, namespace exhausted)."/vlink_ready"). On Windows any non-empty string is accepted.