示例#1
0
class ThreadedPlot(AbstractServer):
    def __init__(self, addr_input):
        AbstractServer.__init__(self)

        queue_in = Queue()
        self._receiver = Receiver(addr_input, queue_in)
        self._handler = PlotHandler(queue_in)

    def start(self):
        self._receiver.start()
        self._handler.start()
        AbstractServer.start(self)

    def _serve(self):
        time.sleep(0.5)

    def _free(self):
        for s in [self._receiver, self._handler]:
            print('Stopping ', s)
            s.stop()
            s.join(2)
            print(s, 'stopped')
示例#2
0
class ThreadedPlot(AbstractServer):
    def __init__(self, addr_input):
        AbstractServer.__init__(self)

        queue_in = Queue()
        self._receiver = Receiver(addr_input, queue_in)
        self._handler = PlotHandler(queue_in)

    def start(self):
        self._receiver.start()
        self._handler.start()
        AbstractServer.start(self)

    def _serve(self):
        time.sleep(0.5)

    def _free(self):
        for s in [self._receiver, self._handler]:
            print('Stopping ', s)
            s.stop()
            s.join(2)
            print(s, 'stopped')
示例#3
0
    def __init__(self, addr_input):
        AbstractServer.__init__(self)

        queue_in = Queue()
        self._receiver = Receiver(addr_input, queue_in)
        self._handler = PlotHandler(queue_in)
示例#4
0
    def __init__(self, addr_input):
        AbstractServer.__init__(self)

        queue_in = Queue()
        self._receiver = Receiver(addr_input, queue_in)
        self._handler = PlotHandler(queue_in)