Skip to content

Instantly share code, notes, and snippets.

@deanberris
Created September 25, 2012 12:58
Show Gist options
  • Save deanberris/3781640 to your computer and use it in GitHub Desktop.
Save deanberris/3781640 to your computer and use it in GitHub Desktop.
Using std::future<response> for responses to client requests.
namespace http = network::http;
std::future<http::response> response_future =
client.get("http://www.google.com/"); // returns immediately
http::response actual_response =
response_future.get(); // will move instead of copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment