def dispatch_reply(self, reply, value):
method = reply.method<EOL>call_id = reply.call_id<EOL>task_id = reply.task_id<EOL>if method & ACK:<EOL><INDENT>try:<EOL><INDENT>result_queue = self.result_queues[call_id]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise KeyError('<STR_LIT>')<EOL><DEDENT>if method == ACCEPT:<EOL><INDENT>worker_info = value<EOL>result = RemoteResult(self, call_id, task_id, worker_info)<EOL>self.results[call_id][task_id] = result<EOL>result_queue.put_nowait(result)<EOL><DEDENT>elif method == REJECT:<EOL><INDENT>result_queue.put_nowait(None)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>result = self.results[call_id][task_id]<EOL>result.set_reply(reply.method, value)<EOL><DEDENT>
Dispatches the reply to the proper queue.