(self)
Called when the thread is started by the user. This method
      is the main of the thread, when called, it will enter in loop
      to wait data or shutdown when needed.
Called when the thread is started by the user. This method
      is the main of the thread, when called, it will enter in loop
      to wait data or shutdown when needed.
Called when the thread is started by the user . This method is the main of the thread when called it will enter in loop to wait data or shutdown when needed .
def run(self):
      """ Called when the thread is started by the user. This method
      is the main of the thread, when called, it will enter in loop
      to wait data or shutdown when needed.
      """
      while True:
         # Get the data
         data = self.getData()
         # Shutdown called
         if self.doshutdown:
             break
         # The pool is full
         if self.poolLength() >= self.poolSize:
            continue
         # There is no data received
         if data is None:
             continue
         # It's a packet from myself
         if data[0] == self.host:
            continue
         with self.recvPoolLock:
            self.recvPool.append(data)

      self.close()
def run ( self ) : while True : # Get the data data = self . getData ( ) # Shutdown called if self . doshutdown : break # The pool is full if self . poolLength ( ) >= self . poolSize : continue # There is no data received if data is None : continue # It's a packet from myself if data [ 0 ] == self . host : continue with self . recvPoolLock : self . recvPool . append ( data ) self . close ( )