def use_select(self):
        while self.alive:
            try:
                inputready,outputready,exceptready = select.select(self.connectionpool.activesockets,
                                                                   [],
                                                                   self.connectionpool.activesockets,
                                                                   1)

                for s in exceptready:
                    if self.debug: self.logger.write("Exception", "%s" % s)
                for s in inputready:
                    if s == self.socket:
                        clientsock,clientaddr = self.socket.accept()
                        if self.debug: self.logger.write("State",
                                                         "accepted a connection from address %s"
                                                         % str(clientaddr))
                        self.connectionpool.activesockets.add(clientsock)
                        self.connectionpool.nascentsockets.add(clientsock)
                        success = True
                    else:
                        success = self.handle_connection(s)
                    if not success:
                        self.connectionpool.del_connection_by_socket(s)
            except KeyboardInterrupt, EOFError:
                os._exit(0)
dataset/ETHPy150Open denizalti/concoord/concoord/node.py/Node.use_select/original