def pending_tasks(self, res):
        "Synchronized access to tasks"
        jobs, lock = self._jobs
        with lock:
            return jobs[res].copy()
def pending_tasks ( self , res ) : jobs , lock = self . _jobs with lock : return jobs [ res ] . copy ( )
Synchronized access to tasks