Handles an event and calls it's handler
        Optional arguments:
        * timeout=0.01 - Wait for an event until the timeout is reached.
189571
def process_once(self, timeout=0.01):
        
        try:
            event = self.recv(timeout)
            if event:
                event_t = event[0]
                event_c = event[1]

                if event_t == 'JOIN':
                    self.on_join(event_c[0], event_c[1])
                elif event_t == 'PART':
                    self.on_part(event_c[0], event_c[1], event_c[2])
                elif event_t == 'PRIVMSG':
                    if event_c[1] in self.channels.keys():
                        self.on_chanmsg(event_c[0], event_c[1], event_c[2])
                    else:
                        self.on_privmsg(event_c[0], event_c[2])
                elif event_t == 'NOTICE':
                    if event_c[1] in self.channels.keys():
                        self.on_channotice(event_c[0], event_c[1], event_c[2])
                    else:
                        self.on_privnotice(event_c[0], event_c[2])
                elif event_t == 'CTCP':
                    if event_c[1] in self.channels.keys():
                        self.on_chanctcp(event_c[0], event_c[1], event_c[2])
                    else:
                        self.on_privctcp(event_c[0], event_c[2])
                elif event_t == 'CTCP_REPLY':
                    self.on_ctcp_reply(event_c[0], event_c[2])
                elif event_t == 'MODE':
                    if event_c[0][0] == self.current_nick:
                        self.on_umode(event_c[1])
                    else:
                        self.on_cmode(event_c[0], event_c[1], event_c[2])
                elif event_t == 'KICK':
                    self.on_kick(event_c[0], event_c[1], event_c[2], \
                    event_c[3])
                elif event_t == 'INVITE':
                    self.on_invite(event_c[0], event_c[2])
                elif event_t == 'NICK':
                    self.on_nick(event_c[0], event_c[1])
                elif event_t == 'TOPIC':
                    self.on_topic(event_c[0], event_c[1], event_c[2])
                elif event_t == 'QUIT':
                    self.on_quit(event_c[0], event_c[1])
                elif event_t == 'LUSERS':
                    self.on_lusers(event_c)
                elif event_t == 'ERROR':
                    self.on_error(event_c[0])
                elif event_t == 'UNKNOWN':
                    self.on_unknown(event_c[0])

        except self.LurklibError as exception:
            self.on_exception(exception)
959975
def wait(
        self, timeout: Union[int, float] = None, safe: bool = False
    ) -> List[Union[Any, Exception]]:
        
        return self.process_list.wait(timeout, safe)
184919
def wait(self, timeout=None):
        
        self.__stopped.wait(timeout)
        return self.__stopped.is_set()
1374554
def execute_request_handler(self):
        
        self._response_timeout_handler = self.loop.call_later(
            self.response_timeout, self.response_timeout_callback
        )
        self._last_request_time = time()
        self._request_handler_task = self.loop.create_task(
            self.request_handler(
                self.request, self.write_response, self.stream_response
            )
        )
391053
def timeout_keep_alive_handler(self):
        
        if not self.transport.is_closing():
            event = h11.ConnectionClosed()
            self.conn.send(event)
            self.transport.close()
1297943
def wait(self, timeout=None):
    

    t_start = time.clock()
    if not wait_for_condition(self, lambda s: s._tasks == 0, timeout):
      raise Timeout
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()
993887
def call(self, timeout=None):
        
        self.start().wait(timeout=timeout)
        if self.is_alive():
            self.stop()
        return self
57492
def handle(self, event):
        
        callback = getattr(self, 'on_{event}'.format(event=event.event), None)
        callback(event)
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()
1028237
def wait(self, timeout=None):
        """"""
        self._event.wait(timeout)
        return self._event.isSet()
157700
def add_timeout_callback(self, callback, timeout_milliseconds, callback_id=None):
        
        def wrapper(*args, **kwargs):
            self.remove_timeout_callback(callback_id)
            return callback(*args, **kwargs)

        handle = None

        def remover():
            if handle is not None:
                self._loop.remove_timeout(handle)

        callback_id = self._assign_remover(callback, callback_id, self._timeout_callback_removers, remover)
        handle = self._loop.call_later(timeout_milliseconds / 1000.0, wrapper)
        return callback_id
1035380
public void processTimeout(TimeoutEvent arg0) {
    synchronized (listeners) {
      Iterator<SipListener> iter = listeners.iterator();
      while (iter.hasNext() == true) {
        SipListener listener = (SipListener) iter.next();
        listener.processTimeout(arg0);
      }
    }
  }
722719
function handler() {
        try {
          if (this.readyState === this.DONE) {

            var response = _buildResponse(this, options.fullResponse);

            // Resolve or reject promise given the response status.
            // HTTP status of 2xx is considered a success.
            if (this.status >= 200 && this.status < 300) {

              if (successCallback) {
                Logger.warnCallbackDeprecation();
                successCallback(response);
              }
              resolve(response);

            } else {
              errorHandler(response);
            }
          }
        } catch (exception) {
          // Do nothing, will be handled by ontimeout.
        }
      }
34946
def start(self, timeout=None):
        
        if self._handler_thread and self._handler_thread.isAlive():
            raise RuntimeError('Message handler thread already started')
        self._server.start(timeout)
        self.ioloop = self._server.ioloop
        if self._handler_thread:
            self._handler_thread.set_ioloop(self.ioloop)
            self._handler_thread.start(timeout)
75188
def settimeout(self, timeout):
        '''
        
        '''
        if timeout is None:
            self._block = True
        elif float(timeout) == 0.0:
            self._block = False
        else:
            self._timeout = float(timeout)
            self._block = True
1163917
def timeout(self, timeout):
        '''
        '''
        if self._timeout is None:
            self.event('connection_made').bind(self._add_timeout)
            self.event('connection_lost').bind(self._cancel_timeout)
        self._timeout = timeout or 0
        self._add_timeout(None)