Home | Trees | Indices | Help |
---|
|
object --+ | FileLock
A file locking mechanism that has context-manager support so you can use it in a with statement. This should be relatively cross compatible as it doesn't rely on msvcrt or fcntl for the locking.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Prepare the file locker. Specify the file to lock and optionally the maximum timeout and the delay between each attempt to lock.
|
Acquire the lock, if possible. If the lock is in use, it check again every `wait` seconds. It does this until it either gets the lock or exceeds `timeout` number of seconds, in which case it throws an exception. |
Get rid of the lock by deleting the lockfile. When working in a `with` statement, this gets automatically called at the end. |
Activated when used in the with statement. Should automatically acquire a lock to be used in the with block. |
Activated at the end of the with statement. It automatically releases the lock if it isn't locked. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Aug 21 01:14:52 2013 | http://epydoc.sourceforge.net |