elt must be already locked (if it is not a thread.error
        exception will be raised)

        The recursive counter for elt is decremented and when it
        reaches zero the lock is released.

def release(self, elt):
        """
        elt must be already locked (if it is not a thread.error
        exception will be raised)

        The recursive counter for elt is decremented and when it
        reaches zero the lock is released.
        """
        self.lock.acquire()
        try:
            if elt not in self.locked:
                raise thread.error, "release unlocked lock for %s" % `elt`
            self.locked[elt][1] -= 1
            if not self.locked[elt][1]:
                del self.locked[elt]
        finally:
            self.lock.release()