Timeout before releasing every thing, if nothing was returned
973065
def _timeout_thread(self, remain):
        """"""
        time.sleep(remain)
        if not self._ended:
            self._ended = True
            self._release_all()
1311929
def _release_all(self):
        """"""
        for i in self.inputs:
            i.call_release(True)
        self.available_lock.release()
1275455
function clear() {
  timeouts.forEach((callback, timeout) => {
    clearTimeout(timeout);

    // reject Promise or execute callback which returns Error
    callback();
  });

  const length = size();
  cache.clear();
  return length;
}
907015
def resetTimeout(self):
        """"""
        if self.__timeoutCall is not None and self.timeOut is not None:
            self.__timeoutCall.reset(self.timeOut)
1236316
def _maybe_stop_timeout():
    
    global _timeout

    if _timeout is not None:
        LOGGER.debug('Removing the pending timeout (%r)', _timeout)
        ioloop.IOLoop.current().remove_timeout(_timeout)
        _timeout = None
133745
def wait_for_zap(self, timeout):
        """"""
        timeout_time = time.time() + timeout
        while not self.is_running():
            if time.time() > timeout_time:
                raise ZAPError('Timed out waiting for ZAP to start.')
            time.sleep(2)
626149
function () {
      waiting = false;
        // console.timeEnd('tracker');
      if (last) {
        // console.log('applying the last');
        fn.apply(last.context, last.args);
        // console.log('and now clear');
        last = null;
      }
    }
512291
function doSomethingUninteresting(data) {
  // simulate latency
  var wait = randomWait(1000);
  return Promise.delay(wait).then(
    () => `It took me ${wait} milliseconds to notice you gave me ${data}.`
  );
}
999457
async def timeout(source, timeout):
    
    async with streamcontext(source) as streamer:
        while True:
            try:
                item = await wait_for(anext(streamer), timeout)
            except StopAsyncIteration:
                break
            else:
                yield item
88952
def waiting(self, timeout=0):
        ""
        if self.linebuffer:
            return True
        (winput, woutput, wexceptions) = select.select((self.sock,), (), (), timeout)
        return winput != []
837858
def wait_until_gone(self, timeout=0, *args, **selectors):
        
        return self.device(**selectors).wait.gone(timeout=timeout)
258403
def main_loop(self, timeout=None):
        
        if self.trigger_event.wait(timeout):
            try:
                self.func()
            except Exception as e:
                self.logger.warning("Got an exception running {func}: {e}".format(func=self.func, e=str(e)))
            finally:
                self.trigger_event.clear()
368927
def timeout(self, timeout):
        """"""
        self._proxy_json._timeout = timeout
        self._proxy_http._timeout = timeout
1028237
def wait(self, timeout=None):
        """"""
        self._event.wait(timeout)
        return self._event.isSet()
219254
async def spaceout(source, interval):
    
    timeout = 0
    loop = asyncio.get_event_loop()
    async with streamcontext(source) as streamer:
        async for item in streamer:
            delta = timeout - loop.time()
            delay = delta if delta > 0 else 0
            await asyncio.sleep(delay)
            yield item
            timeout = loop.time() + interval
45648
def _handle_force_timeout(self) -> None:
        
        while True:
            try:
                ret, num_handles = self._multi.socket_all()
            except pycurl.error as e:
                ret = e.args[0]
            if ret != pycurl.E_CALL_MULTI_PERFORM:
                break
        self._finish_pending_requests()
699778
def wait(self, timeout=-1):
        
        if self._process is None:
            raise RuntimeError('no child process')
        if timeout == -1:
            timeout = self._timeout
        if not self._child_exited.wait(timeout):
            raise Timeout('timeout waiting for child to exit')
        return self.returncode