常用方法
常用方法
常用方法
常用方法
std::function<void()> make_func(Future<T> future, Fn task) { return [=]() mutable { try { future.set(task()); } catch(const std::exception & e) { future.setException(e); } }; }
std::function<void()> make_func(Future<T> future, Fn task) { return [=]() mutable { try { future.set(task()); } catch(const std::exception & e) { future.setException(e); } }; }