摘要: std::promise code sample: #include <vector> #include <thread> #include <future> #include <numeric> #include <iostream> #include <chrono> void accumula 阅读全文
posted @ 2020-09-10 17:02 mangoCzp 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 用到 C++ future 库,代码如下: #include <iostream> #include <future> #include <unistd.h> using namespace std; double f(double a,double b){ double c = a+b; slee 阅读全文
posted @ 2020-09-10 15:52 mangoCzp 阅读(942) 评论(0) 推荐(0) 编辑