ReXGlue SDK
Loading...
Searching...
No Matches
rex::platform::InstanceLock Class Reference

#include <rex/platform/process.h>

Inheritance diagram for rex::platform::InstanceLock:
[legend]

Public Member Functions

 InstanceLock (InstanceLock &&other) noexcept
InstanceLock & operator= (InstanceLock &&other) noexcept

Static Public Member Functions

static Result< InstanceLock > Acquire (std::string_view name)

Additional Inherited Members

Protected Member Functions inherited from rex::MoveOnly
 MoveOnly (MoveOnly &&)=default
MoveOnly & operator= (MoveOnly &&)=default
 MoveOnly (const MoveOnly &)=delete
MoveOnly & operator= (const MoveOnly &)=delete

Detailed Description

A named lock across processes, held for the life of the object.

Member Function Documentation

◆ Acquire()

Result< InstanceLock > rex::platform::InstanceLock::Acquire ( std::string_view name)
staticnodiscard

Takes the lock.

Parameters
nameLock name, shared by every process of the app.
Returns
The held lock, or ErrorCategory::kPlatform when another process holds it.

The documentation for this class was generated from the following file: