StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StDbLib
StHyperLock.h
1
#ifndef __ST_HYPERLOCK_H
2
#define __ST_HYPERLOCK_H
3
4
#include <string>
5
#include <ctime>
6
#include <unistd.h>
7
#include <stdint.h>
8
9
class
StHyperLock
{
10
public
:
11
StHyperLock
(
const
std::string& filename,
bool
create_lock_file =
false
);
12
~
StHyperLock
();
13
14
bool
try_lock(int32_t usec = 0);
// 1 sec = 1000000 usec
15
void
unlock();
16
17
private
:
18
StHyperLock
(
const
StHyperLock
&);
19
StHyperLock
& operator=(
const
StHyperLock
&);
20
21
bool
mIsLocked;
22
bool
mCreateLockFile;
23
std::string mFileName;
24
int
mFileDescriptor;
25
};
26
27
#endif
StHyperLock
Definition:
StHyperLock.h:9
Generated by
1.8.5