def process(self, jobs):
        
        self.numWorkers = GLOBAL_WM.threads
        self.sem = threading.Semaphore(self.numWorkers)
        self.workers = deque()
        for i in range(self.numWorkers):
            worker = GLOBAL_WM.workerPool[i]
            #TODO: only append free workers !
            self.workers.append(worker)
        
        #do the work
        while len(jobs) > 0:
            self.sem.acquire()
            job = jobs.pop()
            job.run(self)
            
        #make sure all workers finished:    
        for i in range(self.numWorkers):
            self.sem.acquire()

        #release the semaphore finally:    
        for i in range(self.numWorkers):
            self.sem.release()            
        
        results = self.results
        self.results = deque()    
        return results
    


#*******************************************************************************
# W o r k e r M a n a g e r                                                    *
#*******************************************************************************
Returns the parsed tree as a list.
dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/core/jobMachine.py/JobMachine.process--crossover with--dataset/ETHPy150Open letsencrypt/letsencrypt/certbot-nginx/certbot_nginx/nginxparser.py/RawNginxParser.as_list