code: def release(self, elt):
          
          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()
docs: 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.