libzypp  17.7.2
zypp::base::InterProcessMutex::Options Class Reference

options to alter the mutex behavor More...

#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. More...
 
void setPath (const Pathname &base)
 set the path where the lockfile is created. More...
 

Public Attributes

std::string name
 
int timeout
 
ConsumerType type
 
Pathname base
 

Detailed Description

options to alter the mutex behavor

Definition at line 59 of file InterProcessMutex.h.

Constructor & Destructor Documentation

◆ Options()

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.

Member Function Documentation

◆ setPath()

void zypp::base::InterProcessMutex::Options::setPath ( const Pathname base)

set the path where the lockfile is created.

Member Data Documentation

◆ name

std::string zypp::base::InterProcessMutex::Options::name

Definition at line 87 of file InterProcessMutex.h.

◆ timeout

int zypp::base::InterProcessMutex::Options::timeout

Definition at line 88 of file InterProcessMutex.h.

◆ type

ConsumerType zypp::base::InterProcessMutex::Options::type

Definition at line 89 of file InterProcessMutex.h.

◆ base

Pathname zypp::base::InterProcessMutex::Options::base

Definition at line 90 of file InterProcessMutex.h.


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