Think of a task as one job in a larger recipe: mixing ingredients, washing a load of laundry, or writing data to a file. A task is a logically independent chunk of work and a general abstraction for a unit of execution. It may contain one operation or a sequence of operations. section 2.2
Programs often execute tasks serially, like washing white clothes, dark clothes, sheets, and towels one load at a time. This ordering is necessary when one task needs the previous task’s result. When tasks are independent, they can instead be organized for concurrent execution. section 2.2 section 2.14
Tasks provide a bridge from an application’s logic to the system that runs it:
- Task-based programming describes computations without depending on a particular machine and supports modular program construction. section 2.2
- Concurrency splits a program into tasks that may run in different orders while producing the same result; those units may also be called coroutines, processes, or threads. section 13.1
- Effective concurrent design first checks whether the problem can be divided into tasks and whether those tasks can communicate and coordinate. section 13.15
From recipe steps to concurrent work
Rotating an image, printing a message, or writing data to a file can each be treated as a task. If several such jobs are independent, a program can organize them for concurrency; if one needs another’s output, their order must be preserved. section 2.2 section 13.1









