def METHOD_NAME(self):
    '''Wait until all jobs have finished'''
    while self.jobs:
        pid, code = os.METHOD_NAME()
        self.job_done(pid, code)
        if self.queue:
            self.start_job(self.queue.pop(0))