async: Fire and Forget

This lesson gives an overview of fire and forget used with std::async in C++ for multithreading.

We'll cover the following...

Fire and forget futures are special futures; they execute just in place because their future is not bound to a variable. For a “fire and forget” future, it is necessary that the promise runs in a separate thread so it can immediately start its work. This is done by the std::launch::async policy.

Let’s compare an ordinary future with a fire and forget future.

Access this course and 1400+ top-rated courses and projects.