#include <InterProcessMutex.h>
Public Member Functions | |
Options (ConsumerType ptype, const std::string &pname="zypp", int ptimeout=-1) | |
Options for a mutex of type ptype with a given name and timeout. | |
void | setPath (const Pathname &base) |
set the path where the lockfile is created. | |
Public Attributes | |
std::string | name |
int | timeout |
ConsumerType | type |
Pathname | base |
Definition at line 59 of file InterProcessMutex.h.
zypp::base::InterProcessMutex::Options::Options | ( | ConsumerType | ptype, | |
const std::string & | pname = "zypp" , |
|||
int | ptimeout = -1 | |||
) |
Options for a mutex of type ptype with a given name and timeout.
Default is name "zypp" and no timeout (wait till resource is free)
The mutex type, Writer or Reader must be given explictly.
The mutex will be handled using a lock file located on default library path if the library is running as root, and in users home directory if not.
Definition at line 40 of file InterProcessMutex.cc.
References base, and zypp::filesystem::TmpPath::defaultLocation().
void zypp::base::InterProcessMutex::Options::setPath | ( | const Pathname & | base | ) |
set the path where the lockfile is created.
std::string zypp::base::InterProcessMutex::Options::name |
Definition at line 87 of file InterProcessMutex.h.
Referenced by zypp::base::InterProcessMutex::InterProcessMutex(), and zypp::base::InterProcessMutex::lockFilePath().
Definition at line 88 of file InterProcessMutex.h.
Referenced by zypp::base::InterProcessMutex::InterProcessMutex().
Definition at line 89 of file InterProcessMutex.h.
Referenced by zypp::base::InterProcessMutex::InterProcessMutex(), and zypp::base::InterProcessMutex::~InterProcessMutex().
Definition at line 90 of file InterProcessMutex.h.
Referenced by zypp::base::InterProcessMutex::lockFilePath(), and Options().