Reputation: 30
I want to get return value of the function wait_for_user_input
before if
condition!
int wait_for_user_input(){
// get input user
// return input user
}
const auto future = std::async( std::launch::async, wait_for_user_input);
while( future.wait_for( std::chrono::milliseconds(200) ) == std::future_status::timeout ){
// do somthing
}
if ("return of wait_for_user_input"="x"){
// do somthing
}
Upvotes: 0
Views: 169