Tasks
In this lesson, we will see how tasks should be your first choice in the general case of multithreading.
We'll cover the following...
Introduction
Tasks were one of the latest additions to the C++11 standard, and they offer a better abstraction than threads.
In addition to threads, C++ has tasks to perform work asynchronously. Tasks need the <future>
header. A task will be parameterized with a work package, and it consists of the two associated components: a promise
and a future
. Both are connected via data channel.
The promise
executes the work packages and puts the result in the data channel. The associated future
picks up the result. Both communication ...
Access this course and 1400+ top-rated courses and projects.