Folly::future V.S. std::future
#include <future>
#include <iostream>
#include <thread>
int main()
{
// future from a packaged_task
std::packaged_task<int()> task([]{ return 7; }); // wrap the function
std::future<int> f1 = task.get_future(); // get a future
std::t...
noahyao.me1 min read