gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
file_lock.hpp File Reference

GAMBIT file locking functions Use these to block access to sensitive parts of the code by other processes when we are using them. More...

#include <string>
Include dependency graph for file_lock.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

*mylock release_lock ()
 

Detailed Description

GAMBIT file locking functions Use these to block access to sensitive parts of the code by other processes when we are using them.

For example, some backends do stupid things like initialise themselves by writing and reading files; use these routines to force only one process at a time to perform these routines.

Usage:

{ Utils::FileLock mylock("some_unique_name"); mylock.get_lock(); /* Do sensitive stuff. No other process will be allowed into this code region while we are here.

Definition in file file_lock.hpp.

Function Documentation

◆ release_lock()

* mylock release_lock ( )