def get_job(self, callback):
assert not self._closed<EOL>if self._active_js is None or not self._active_js.job_available():<EOL><INDENT>self._ready_callbacks.append(callback)<EOL><DEDENT>else:<EOL><INDENT>job = self._active_js.get_job()<EOL>self._job_sources[job] = self._active_js<EOL>callback(job)<EOL><DEDENT>
Calls the given callback function when a job becomes available.