Esempio n. 1
0
    def _init_gatherers(self, threads):
        logger.info('launching gatherers...')
        self.gatherer_s = self.context.socket(zmq.PUSH)
        self.gatherer_sink_s = self.context.socket(zmq.PULL)
        self.gatherer_s.bind(GATHERER_ADDR)
        self.gatherer_sink_s.bind(GATHERER_SINK_ADDR)

        for n in range(int(threads)):
            p = mp.Process(target=Gatherer().start)
            p.start()
            self.gatherers.append(p)
Esempio n. 2
0
 def _init_gatherers(self, threads):
     self.logger.info('launching gatherers...')
     for n in range(int(threads)):
         p = mp.Process(target=Gatherer().start)
         p.start()
Esempio n. 3
0
 def _init_gatherers(self, threads):
     self.logger.info('launching gatherers...')
     for n in range(int(threads)):
         t = threading.Thread(target=Gatherer(self.context).start)
         t.daemon = True
         t.start()