RADLib
RADical C++ application framework
RADService::SingleInstanceLock Class Reference

Single-instance app lock using RADCore::RADLockFile. More...

#include <RADService.h>

Public Member Functions

 SingleInstanceLock (std::string path)
 Creates a lock for path. More...
 
 ~SingleInstanceLock ()
 Releases the lock. More...
 
bool tryLock ()
 Attempts to acquire the lock. More...
 
bool isLocked () const
 Returns true when lock is held. More...
 

Detailed Description

Single-instance app lock using RADCore::RADLockFile.

Constructor & Destructor Documentation

◆ SingleInstanceLock()

RADService::SingleInstanceLock::SingleInstanceLock ( std::string  path)
explicit

Creates a lock for path.

◆ ~SingleInstanceLock()

RADService::SingleInstanceLock::~SingleInstanceLock ( )

Releases the lock.

Member Function Documentation

◆ isLocked()

bool RADService::SingleInstanceLock::isLocked ( ) const

Returns true when lock is held.

◆ tryLock()

bool RADService::SingleInstanceLock::tryLock ( )

Attempts to acquire the lock.


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