class Gambit::Utils::ProcessLock
Class to manage a process lock, using a file.
#include <file_lock.hpp>
Inherits from Gambit::Utils::FileLock
Public Functions
Name | |
---|---|
ProcessLock(const std::string & fname, const bool is_exhaustible =true, const bool harderrs =false) Constructor. | |
void | clean_locks() Clean up existing process locks. |
Additional inherited members
Public Functions inherited from Gambit::Utils::FileLock
Name | |
---|---|
FileLock(const std::string & fname, const bool is_exhaustible =false, const bool harderrs =false) Constructor. | |
~FileLock() | |
void | get_lock() Obtain lock (or wait if lock cannot be obtained, and then obtain lock) |
void | release_lock() Release a lock (error if no lock held) |
const std::string & | get_filename() const Getter for lockfile name. |
bool | exhausted() Check if lock is exhausted. |
Public Functions Documentation
function ProcessLock
ProcessLock(
const std::string & fname,
const bool is_exhaustible =true,
const bool harderrs =false
)
Constructor.
function clean_locks
static void clean_locks()
Clean up existing process locks.
Deleting existing locks.
Updated on 2024-07-18 at 13:53:32 +0000