Ejemplo n.º 1
0
 def __init__(self, transferQueue):
     """
     Initializes the thread's state.
     Args:
     """
     QueueProcessingThread.__init__(self, "Outgoing data processing thread",
                                    transferQueue)
Ejemplo n.º 2
0
 def start(self):
     """
     Starts the thread
     Args:
         None
     Returns:
         Nothing
     """
     self.__referenceCounter.increment()
     if self.__referenceCounter.read() == 1:
         QueueProcessingThread.start(self)
Ejemplo n.º 3
0
 def __init__(self, transferQueue, callbackObject):
     """
     Initializes the thread's state
     Args:
         transferQueue: The incoming packages transferQueue 
         callbackObject: The callback object that will process
         all the received packets.
     """
     QueueProcessingThread.__init__(self, "Incoming data processing thread", transferQueue)
     self.__callbackObject = callbackObject
     self.__referenceCounter = MultithreadingCounter()
Ejemplo n.º 4
0
 def start(self):
     """
     Starts the thread
     Args:
         None
     Returns:
         Nothing
     """
     self.__referenceCounter.increment()
     if (self.__referenceCounter.read() == 1):
         QueueProcessingThread.start(self)
Ejemplo n.º 5
0
 def __init__(self, transferQueue, callbackObject):
     """
     Initializes the thread's state
     Args:
         transferQueue: The incoming packages transferQueue 
         callbackObject: The callback object that will process
         all the received packets.
     """
     QueueProcessingThread.__init__(self, "Incoming data processing thread",
                                    transferQueue)
     self.__callbackObject = callbackObject
     self.__referenceCounter = MultithreadingCounter()
Ejemplo n.º 6
0
 def stop(self, join):
     """
     Asks this thread to terminate.
     Args:
         join: When True, the calling thread will wait the incoming data thread
         to terminate. When False, the calling thread will only ask this thread to terminate.
     Returns: 
         Nothing
     """
     self.__referenceCounter.decrement()
     if self.__referenceCounter.read() == 0:
         QueueProcessingThread.stop(self)
         if join:
             self.join()
Ejemplo n.º 7
0
 def stop(self, join):
     """
     Asks this thread to terminate.
     Args:
         join: When True, the calling thread will wait the incoming data thread
         to terminate. When False, the calling thread will only ask this thread to terminate.
     Returns: 
         Nothing
     """
     self.__referenceCounter.decrement()
     if self.__referenceCounter.read() == 0:
         QueueProcessingThread.stop(self)
         if join:
             self.join()
Ejemplo n.º 8
0
 def __init__(self, transferQueue):
     """
     Initializes the thread's state.
     Args:
     """
     QueueProcessingThread.__init__(self, "Outgoing data processing thread", transferQueue)
Ejemplo n.º 9
0
 def run(self):
     QueueProcessingThread.run(self)
Ejemplo n.º 10
0
 def run(self):
     QueueProcessingThread.run(self)