(self)
closes a ThreadPoolServer. In particular, joins the thread pool.
closes a ThreadPoolServer. In particular, joins the thread pool.
closes a ThreadPoolServer . In particular joins the thread pool .
def close(self):
        '''closes a ThreadPoolServer. In particular, joins the thread pool.'''
        # close parent server
        Server.close(self)
        # stop producer thread
        self.polling_thread.join()
        # cleanup thread pool : first fill the pool with None fds so that all threads exit
        # the blocking get on the queue of active connections. Then join the threads
        for _ in range(len(self.workers)):
            self._active_connection_queue.put(None)
        for w in self.workers:
            w.join()
def close ( self ) : # close parent server Server . close ( self ) # stop producer thread self . polling_thread . join ( ) # cleanup thread pool : first fill the pool with None fds so that all threads exit # the blocking get on the queue of active connections. Then join the threads for _ in range ( len ( self . workers ) ) : self . _active_connection_queue . put ( None ) for w in self . workers : w . join ( )