This is an extension to the basic python threading library. It allows inheritance of locks and several other non-inheritable types. It also adds a few new lock types for those who found the original set lacking.
Any class starting with an "I" is a new inheritable class type. These have the same name as the generator function that they override, but with the first letter in lowercase, and the "I" prepended. They typically don't add anything special, what differences are there are mentioned in the docstrings.
Next there are the Slock and Srlock classes. These are both lock classes, except they define an saquire function, a gaquire function, and an eaquire function. The first function will aquire a lock and return an object, false, or none, depending on blocking (see docstrings for more information). When the object is destroyed, and it hasn't released it's lock yet, the lock is released and a callback is called, useful for debugging. The other two functions simply are two methods of trying to attain a lock with a timeout rather than blocking and non-blocking. Again, see the docstrings for more information
Finally, there is an Rwlock class. This has the standard acquire function, with an added argument, and tacquire function (timeouted acquire). These are described in the docstrings, but for a quick synopsys. The new aquire function takes an initial argument of Rwlock.READ or Rwlock.WRITE, and uses this to determine if a read or write lock is being granted. Read locks are non-exclusive (but prevent write-locks), and write-locks are exclusive. Read locks block or fail if there are pending write locks when they are called, otherwise aqurie. If there are pending write locks when a read lock is requested, it will wait for the first write lock to get acquired before attempting (agressively) to get it's own lock.
downloads: