1f30ce0b614a8c506595b42bbcace02e0829c180
locked decorator
This decorator is useful to lock a instance method where that instance object that the method is attached to has a lock object connected to an attribute (or list of locks) that should be acquired before/after running the decorated method.
Fasteners
Overview
A python package that provides useful locks.
It includes the following.
Reader-writer locks
- Multiple readers (at the same time).
- Single writers (blocking any readers).
- Helpful
read_lockedandwrite_lockeddecorators.
Inter-process locks
- Single writer using file based locking (these automatically release
on process exit, even if
__release__or__exit__is never called). - Helpful
interprocess_lockeddecorator.
Description
Languages
Python
100%
