![]() |
ATLAS Offline Software
|
Classes | |
| class | FileLockAcquisitionError |
| class | FileLockReleaseError |
Public Types | |
| typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type | result |
Public Member Functions | |
| __init__ (self, path, debug=None, blocking=False) | |
| acquire (self) | |
| release (self) | |
| islocked (self) | |
| ownlock (self) | |
| __del__ (self) | |
| __enter__ (self) | |
| __exit__ (self, typ, value, tb) | |
Public Attributes | |
| pid = os.getpid() | |
| host = socket.gethostname() | |
| path = path | |
| debug = debug | |
| bool | locked = False |
| lockfile = None | |
| blocking = blocking | |
Static Public Attributes | |
| str | addr = lambda self: '%d@%s' % (self.pid, self.host) |
| str | fddr = lambda self: '<%s %s>' % (self.path, self.addr()) |
| str | pddr |
Protected Member Functions | |
| _readlock (self) | |
Class to handle creating and removing lockfiles
Definition at line 13 of file SingleAppInstance.py.
|
inherited |
Definition at line 90 of file EDM_MasterSearch.h.
Definition at line 27 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.__del__ | ( | self | ) |
Magic method to clean up lock when program exits
Definition at line 119 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.__enter__ | ( | self | ) |
Definition at line 123 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.__exit__ | ( | self, | |
| typ, | |||
| value, | |||
| tb ) |
Definition at line 127 of file SingleAppInstance.py.
|
protected |
Internal method to read lock info
Definition at line 99 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.acquire | ( | self | ) |
Acquire a lock, returning self if successful, False otherwise
Definition at line 36 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.islocked | ( | self | ) |
Check if we already have a lock
Definition at line 111 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.ownlock | ( | self | ) |
Check if we own the lock
Definition at line 115 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.release | ( | self | ) |
Release lock, returning self
Definition at line 78 of file SingleAppInstance.py.
|
static |
Definition at line 22 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.blocking = blocking |
Definition at line 34 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.debug = debug |
Definition at line 31 of file SingleAppInstance.py.
|
static |
Definition at line 23 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.host = socket.gethostname() |
Definition at line 29 of file SingleAppInstance.py.
| bool python.SingleAppInstance.SingleAppInstance.locked = False |
Definition at line 32 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.lockfile = None |
Definition at line 33 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.path = path |
Definition at line 30 of file SingleAppInstance.py.
|
static |
Definition at line 24 of file SingleAppInstance.py.
| python.SingleAppInstance.SingleAppInstance.pid = os.getpid() |
Definition at line 28 of file SingleAppInstance.py.