Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 416 Bytes

README.md

File metadata and controls

23 lines (20 loc) · 416 Bytes

python_posix_rwlock

Python wrapper around posix rwlock.

Sample usage:

>>> import posix_rwlock
>>> lock = posix_rwlock.RWLock()
>>> lock.try_wrlock()
True
>>> lock.wrlock()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
posix_rwlock.RWLockException: Resource deadlock avoided
>>> lock.unlock()
True
>>> lock.try_rdlock()
True
>>> lock.try_wrlock()
False