def pop_job(self, returning=True):
        if not self:
            return None
        if not returning:
            return self._pop_job(next(reversed(self._jobs.keys())))
        for func_addr in reversed(self._jobs.keys()):
            if func_addr not in self._returning_functions:
                continue
            return self._pop_job(func_addr)
        return None