get_future
c++ std::package_task,task.get_future()
#include <iostream> #include <future> #include <thread> int countdown(int from,int to) { for(int i=from;i!=to;--i) { std::cout<<i<<std::endl; std::thi ......
thread promise get_future(),get(), promise set_value()
#include <chrono> #include <ctime> #include <future> #include <iomanip> #include <iostream> #include <sstream> #include <string> #include <thread> #in ......