contents

 

Front matter

preface

acknowledgments

about this book

about the author

about the cover illustration

  1 Getting to know asyncio

   1.1 What is asyncio?

   1.2 What is I/O-bound and what is CPU-bound?

   1.3 Understanding concurrency, parallelism, and multitasking

Concurrency

Parallelism

The difference between concurrency and parallelism

What is multitasking?

The benefits of cooperative multitasking

   1.4 Understanding processes, threads, multithreading, and multiprocessing

Process

Thread

   1.5 Understanding the global interpreter lock

Is the GIL ever released?

asyncio and the GIL

   1.6 How single-threaded concurrency works

What is a socket?

   1.7 How an event loop works

  2 asyncio basics

   2.1 Introducing coroutines