code: def _timeout_thread(self, remain):
          
          time.sleep(remain)
          if not self._ended:
              self._ended = True
              self._release_all()
docs: Timeout before releasing every thing, if nothing was returned