rpc_response_task is a special kind of task, because we support the semantic of distributed service in sending rpc request, for example: "querying meta-server and send message to proper replica-server based on gpid". in order to support this, we need to replace the original rpc response callback to another one: 1. which can proecss the distributed service semantics, AND 2. which won't call the or
| 502 | // TODO(sunweijie): totally elimite this feature |
| 503 | // |
| 504 | void fetch_current_handler(rpc_response_handler &cb) { cb = std::move(_cb); } |
| 505 | void replace_callback(rpc_response_handler &&cb) |
| 506 | { |
| 507 | task_state cur_state = state(); |