Tag: future
3 posts
-
C++ packaged_task: Deferred Tasks, Futures, and Thread Pools
std::packaged_task is a C++11 feature that wraps a function or callable object and allows you to receive the result as a std::future.
-
C++ std::future and std::promise: Passing Results Between Threads vs std::async
How std::future and std::promise pass a result between threads in C++, and the difference between this and using std::async directly.
-
std::async and Launch Policies: When async Actually Runs on Another Thread
What std::launch::async and deferred really do, why the default policy breaks wait_for loops, why the returned future blocks in its destructor, and exceptions.