Example #1
0
    def __init__ (self, repo, repo_uri, jobs_done = True, poolsize = POOL_SIZE, queuesize = None):
        self.jobs_done = jobs_done

        self.queue = AsyncQueue (queuesize or 0)
        if self.jobs_done:
            self.done = AsyncQueue ()
            
        for i in range (poolsize):
            rep = rh.create_repository (repo.get_type (), repo.get_uri ())
            thread = threading.Thread (target=self._job_thread, args=(rep, repo_uri))
            thread.setDaemon (True)
            thread.start ()