Practice ยท 2 of 2
Promise/Future Across Threads
Implement runWithResult(std::function<int()>): run the callable on a fresh std::thread, deliver its result through a promise/future, join the thread, and return the result.
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: Threads That Behave