66 auto run(F&& f, Args&&... args) -> std::future<
typename std::invoke_result<F, Args...>::type> {
67 using return_type =
typename std::invoke_result<F, Args...>::type;
69 auto future_work = std::bind(std::forward<F>(f), std::forward<Args>(args)...);
70 auto task = std::make_shared<std::packaged_task<return_type()>>(future_work);
71 auto future_result = task->get_future();
72 queue_thunk([task]() { (*task)(); });