You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
coro_http_client client;
std::vector<async_simple::coro::Lazy<resp_data>> futures;
for (int i = 0; i < 10; ++i) {
futures.push_back(client.async_get("http://www.baidu.com/"));
}
auto out = co_awaitasync_simple::coro::collectAll(std::move(futures));
for (auto &item : out) {
auto result = item.value();
CHECK(result.status == 200);
}
这种情况下,如何获取每个接口调用各自耗时呢
The text was updated successfully, but these errors were encountered:
通过多个协程去请求服务端:
这种情况下,如何获取每个接口调用各自耗时呢
The text was updated successfully, but these errors were encountered: