Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::runtime::InterProcessLock Class Reference

#include <inter_process_lock.hpp>

Public Member Functions

 InterProcessLock (std::string_view name)
 Create a lock with the given name (used to derive the lock file path).
 ~InterProcessLock ()
bool try_lock ()
 Try to acquire the lock. Returns true if acquired.
bool try_lock_shared ()
 Try to acquire a shared/read lock. Multiple shared holders may coexist.
void unlock ()
 Release the lock.
bool is_locked () const
 Whether this instance holds the lock.
 InterProcessLock (const InterProcessLock &)=delete
InterProcessLock & operator= (const InterProcessLock &)=delete

Constructor & Destructor Documentation

◆ InterProcessLock() [1/2]

pulp::runtime::InterProcessLock::InterProcessLock ( std::string_view name)
explicit

Create a lock with the given name (used to derive the lock file path).

◆ ~InterProcessLock()

pulp::runtime::InterProcessLock::~InterProcessLock ( )

◆ InterProcessLock() [2/2]

pulp::runtime::InterProcessLock::InterProcessLock ( const InterProcessLock & )
delete

Member Function Documentation

◆ is_locked()

bool pulp::runtime::InterProcessLock::is_locked ( ) const
inline

Whether this instance holds the lock.

◆ operator=()

InterProcessLock & pulp::runtime::InterProcessLock::operator= ( const InterProcessLock & )
delete

◆ try_lock()

bool pulp::runtime::InterProcessLock::try_lock ( )

Try to acquire the lock. Returns true if acquired.

◆ try_lock_shared()

bool pulp::runtime::InterProcessLock::try_lock_shared ( )

Try to acquire a shared/read lock. Multiple shared holders may coexist.

◆ unlock()

void pulp::runtime::InterProcessLock::unlock ( )

Release the lock.


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