Introduction

This lesson introduces the concept of asynchronous programming as an important programming paradigm.

We'll cover the following...

Introduction

Concurrency can be defined as dealing with multiple things at once. You can concurrently run several processes or threads on a machine with a single CPU but you'll not be parallel when doing so. Concurrency allows us to create an illusion of parallel execution even though the single CPU machine runs one thread or process at a time.

Parallelism is when we execute multiple things at once. True parallelism can only be achieved with multiple CPUs.

A machine with four cores and running one hundred processes is both parallel and concurrent but mostly concurrent because it can only do four things at a time.

Another paradigm to achieve concurrency on a single core-machine is via cooperative multitasking, which we discuss next.

Cooperative Multitasking

Multithreading on a single core machine ...