示例#1
0
    def __init__(self):
        self._db = {}

        # uses a heuristic based on the current to trigger
        # service/worker threads
        self._nc = multiprocessing.cpu_count() * 2
        self.init_q()
        self._pool = ThreadPool(self._db, self._q)
        self._pool.start()