parameters: (self, poll_interval=None)
docstring: Overrides the serve_forever([poll_interval]) in class
          socketserver.BaseServer.
  
          It uses a socketpair to wake up the select when shutdown() is
          called in anther thread.  Note, parameter 'poll_interval' is
          just used for interface compatibility; it's never used in this
          function.
docstring_summary: Overrides the serve_forever([poll_interval]) in class
          socketserver.BaseServer.
docstring_tokens: Overrides the serve_forever ( [ poll_interval ] ) in class socketserver . BaseServer .
function: def serve_forever(self, poll_interval=None):
          ''' Overrides the serve_forever([poll_interval]) in class
          socketserver.BaseServer.
  
          It uses a socketpair to wake up the select when shutdown() is
          called in anther thread.  Note, parameter 'poll_interval' is
          just used for interface compatibility; it's never used in this
          function.
          '''
          while True:
              # block until the self.socket or self.__read_sock is readable
              try:
                  r, w, e = select.select([self, self.__read_sock], [], [])
              except select.error as err:
                  if err.args[0] == EINTR:
                      continue
                  else:
                      break
  
              if self.__read_sock in r:
                  break
              else:
                  self._handle_request_noblock();
  
          self._is_shut_down.set()
function_tokens: def serve_forever ( self , poll_interval = None ) : while True : # block until the self.socket or self.__read_sock is readable try : r , w , e = select . select ( [ self , self . __read_sock ] , [ ] , [ ] ) except select . error as err : if err . args [ 0 ] == EINTR : continue else : break if self . __read_sock in r : break else : self . _handle_request_noblock ( ) self . _is_shut_down . set ( )