#include <iostream>
#include <future>
#include <thread>
using namespace std;
using namespace std::this_thread;
using namespace std::chrono;
//费时操作
void work1(promise<int> &prom, int a, int b)
{
cout << "work1开始计算:" << endl;
sleep_for(seconds(3));
prom.set_value(a+b);
}
int work2