Home | Trees | Indices | Help |
|
---|
|
object --+ | Lock
A mutex implementation that uses atomicity of the mkdir operation in UNIX-like systems. This can be used by scripts to provide for mutual exlusion, either in single scripts using threads etc. or i.e. to handle sitations of possible collisions among multiple running scripts. You can choose to make randomized single-script wise locks or a more general locks if you do not choose to randomize the lockdir name
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
You can change the default lockdir location or name. Setting randomize to False will result in no random string being appened to the lockdir name.
|
Creates a lockdir based on the settings on Lock() instance creation. Raises OSError exception of the lock is already present. Should be atomic on POSIX compliant systems. |
Removes a lock. Will raise OSError exception if the lock was not present. Should be atomic on POSIX compliant systems. |
Makes sure lock is removed when the process ends. Although not when killed indeed. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Apr 16 16:06:06 2014 | http://epydoc.sourceforge.net |