コード例 #1
0
ファイル: gevent_runner.py プロジェクト: sauramirez/pysqes
    def perform_task(self, task):
        # wait for tasks to finish and rejoin them
        if len(self.current_threads) > self.thread_number:
            gevent.join_all(self.current_threads)
            self.current_threads = []

        self.current_threads.append(gevent.spawn(task.run))
コード例 #2
0
ファイル: gevent_runner.py プロジェクト: sauramirez/pysqes
 def shutdown(self):
     logger.info("Shutting down gevent threads")
     return gevent.join_all(self.current_threads)