@@ -35,7 +35,8 @@ bool RPCClient::AsyncSendVariable(const std::string& ep,
35
35
const framework::Scope* p_scope = &scope;
36
36
const auto ch = GetChannel (ep_val);
37
37
38
- framework::Async ([var_name_val, p_ctx, ep_val, p_scope, time_out, ch, this ] {
38
+ framework::AsyncIO ([var_name_val, p_ctx, ep_val, p_scope, time_out, ch,
39
+ this ] {
39
40
auto * var = p_scope->FindVar (var_name_val);
40
41
41
42
::grpc::ByteBuffer req;
@@ -90,7 +91,8 @@ bool RPCClient::AsyncGetVariable(const std::string& ep,
90
91
const framework::Scope* p_scope = &scope;
91
92
const auto ch = GetChannel (ep_val);
92
93
93
- framework::Async ([var_name_val, ep_val, p_scope, p_ctx, time_out, ch, this ] {
94
+ framework::AsyncIO ([var_name_val, ep_val, p_scope, p_ctx, time_out, ch,
95
+ this ] {
94
96
// prepare input
95
97
sendrecv::VariableMessage req;
96
98
req.set_varname (var_name_val);
@@ -133,8 +135,8 @@ bool RPCClient::AsyncPrefetchVariable(const std::string& ep,
133
135
const framework::Scope* p_scope = &scope;
134
136
const auto ch = GetChannel (ep_val);
135
137
136
- framework::Async ([in_var_name_val, out_var_name_val, ep_val, p_scope, p_ctx,
137
- time_out, ch, this ] {
138
+ framework::AsyncIO ([in_var_name_val, out_var_name_val, ep_val, p_scope, p_ctx,
139
+ time_out, ch, this ] {
138
140
auto * var = p_scope->FindVar (in_var_name_val);
139
141
140
142
::grpc::ByteBuffer req;
@@ -197,7 +199,7 @@ bool RPCClient::Wait() {
197
199
std::vector<std::future<void >> waits (req_count_);
198
200
199
201
for (int i = 0 ; i < req_count_; i++) {
200
- waits[i] = framework::Async ([i, &a, this ] { a[i] = Proceed (); });
202
+ waits[i] = framework::AsyncIO ([i, &a, this ] { a[i] = Proceed (); });
201
203
}
202
204
203
205
for (int i = 0 ; i < req_count_; i++) {
0 commit comments