Table of Contents
├── (1) Cover (Pages: 1-3)
├── (2) Copyright (Pages: 4-6)
├── (3) Table of Contents (Pages: 7-8)
├── (4) Preface (Pages: 9-12)
│   ├── (4.1) Conventions Used in This Book (Pages: 10-10)
│   ├── (4.2) O’Reilly Online Learning (Pages: 11-10)
│   ├── (4.3) How to Contact Us (Pages: 11-11)
│   └── (4.4) Acknowledgments (Pages: 12-12)
├── (5) Chapter 1. Introducing Asyncio (Pages: 13-20)
│   ├── (5.1) The Restaurant of ThreadBots (Pages: 13-17)
│   ├── (5.2) Epilogue (Pages: 18-17)
│   └── (5.3) What Problem Is Asyncio Trying to Solve? (Pages: 18-20)
├── (6) Chapter 2. The Truth About Threads (Pages: 21-32)
│   ├── (6.1) Benefits of Threading (Pages: 22-22)
│   ├── (6.2) Drawbacks of Threading (Pages: 23-25)
│   └── (6.3) Case Study: Robots and Cutlery (Pages: 26-32)
├── (7) Chapter 3. Asyncio Walk-Through (Pages: 33-86)
│   ├── (7.1) Quickstart (Pages: 34-39)
│   ├── (7.2) The Tower of Asyncio (Pages: 40-42)
│   ├── (7.3) Coroutines (Pages: 43-48)
│   │   ├── (7.3.1) The New async def Keywords (Pages: 44-45)
│   │   └── (7.3.2) The New await Keyword (Pages: 46-48)
│   ├── (7.4) Event Loop (Pages: 49-50)
│   ├── (7.5) Tasks and Futures (Pages: 51-57)
│   │   └── (7.5.1) Create a Task? Ensure a Future? Make Up Your Mind! (Pages: 54-57)
│   ├── (7.6) Async Context Managers: async with (Pages: 58-61)
│   │   └── (7.6.1) The contextlib Way (Pages: 59-61)
│   ├── (7.7) Async Iterators: async for (Pages: 62-64)
│   ├── (7.8) Simpler Code with Async Generators (Pages: 65-66)
│   ├── (7.9) Async Comprehensions (Pages: 67-68)
│   └── (7.10) Starting Up and Shutting Down (Gracefully!) (Pages: 69-86)
│       ├── (7.10.1) What Is the return_exceptions=True for in gather()? (Pages: 73-74)
│       ├── (7.10.2) Signals (Pages: 75-79)
│       └── (7.10.3) Waiting for the Executor During Shutdown (Pages: 80-86)
├── (8) Chapter 4. 20 Asyncio Libraries You Aren’t Using (But…Oh, Never Mind) (Pages: 87-140)
│   ├── (8.1) Streams (Standard Library) (Pages: 88-99)
│   │   ├── (8.1.1) Case Study: A Message Queue (Pages: 88-95)
│   │   └── (8.1.2) Case Study: Improving the Message Queue (Pages: 96-99)
│   ├── (8.2) Twisted (Pages: 100-102)
│   ├── (8.3) The Janus Queue (Pages: 103-103)
│   ├── (8.4) aiohttp (Pages: 104-109)
│   │   ├── (8.4.1) Case Study: Hello World (Pages: 105-104)
│   │   └── (8.4.2) Case Study: Scraping the News (Pages: 105-109)
│   ├── (8.5) ØMQ (ZeroMQ) (Pages: 110-121)
│   │   ├── (8.5.1) Case Study: Multiple Sockets (Pages: 111-113)
│   │   └── (8.5.2) Case Study: Application Performance Monitoring (Pages: 114-121)
│   ├── (8.6) asyncpg and Sanic (Pages: 122-137)
│   │   └── (8.6.1) Case Study: Cache Invalidation (Pages: 127-137)
│   └── (8.7) Other Libraries and Resources (Pages: 138-140)
├── (9) Chapter 5. Concluding Thoughts (Pages: 141-142)
├── (10) Appendix A. A Short History of Async Support in Python (Pages: 143-146)
│   ├── (10.1) In the Beginning, There Was asyncore (Pages: 143-144)
│   └── (10.2) The Path to Native Coroutines (Pages: 145-146)
├── (11) Appendix B. Supplementary Material (Pages: 147-156)
│   ├── (11.1) Cutlery Example Using Asyncio (Pages: 147-148)
│   ├── (11.2) Supplementary Material for News Website Scraper (Pages: 149-149)
│   ├── (11.3) Supplementary Material for the ZeroMQ Case Study (Pages: 150-151)
│   ├── (11.4) Database Trigger Handling for the asyncpg Case Study (Pages: 152-154)
│   └── (11.5) Supplementary Material for the Sanic Example: aelapsed and aprofiler (Pages: 155-156)
├── (12) Index (Pages: 157-164)
├── (13) About the Author (Pages: 165-164)
└── (14) Colophon (Pages: 165-166)
