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.
voidclean_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()
voidget_lock()
Obtain lock (or wait if lock cannot be obtained, and then obtain lock)
voidrelease_lock()
Release a lock (error if no lock held)
const std::string &get_filename() const
Getter for lockfile name.
boolexhausted()
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 2023-06-26 at 21:36:53 +0000