Files
deb-python-fasteners/doc/source/api/process_lock.rst
Yuval Greenfield ab56d2029f Added a code sample
I have not tested this change, I apologize for that.
2015-11-13 11:38:27 -08:00

659 B

Process lock

Classes

fasteners.process_lock.InterProcessLock

fasteners.process_lock._InterProcessLock

Decorators

fasteners.process_lock.interprocess_locked

@fasteners.process_lock.interprocess_locked('tmp_lock_file')
def test():
    for i in range(10):
        print('I have the lock')
        time.sleep(1)


print('Waiting for the lock')
test()