Async Techniques and Examples in Python Transcripts
Chapter: async and await with asyncio
Lecture: Python async landscape: asyncio

Login or purchase this course to watch this video and the rest of the course contents.
0:00 We're going to start our actual exploration
0:02 and programming examples of concurrency in Python
0:05 without threads and without sub-processes.
0:09 That's right, we're going to do concurrent programming
0:11 no threads, no sub-processes.
0:14 It may sound impossible.
0:15 It certainly sounds kind of weird, right?
0:17 We think of parallel programming
0:19 as involving multiple threads or maybe multiple processes
0:22 in the case of a sub-process.
0:24 But we're going to see that there's a new, fancy way
0:27 that is mostly focused on scalability
0:29 that does not at all involve threads in Python.
0:32 It is my favorite type of concurrent programming
0:34 in Python by far.
0:36 Of course I'm speaking about AsyncIO.
0:38 AsyncIO is what you might call
0:41 cooperative concurrency or parallelism.
0:44 The programs themself state explicitly
0:47 "Here's a part where I'm waiting
0:49 you can go do something else.
0:50 Here's another part where I'm waiting
0:51 on a web request or a database
0:53 you can go do other work right then, but not other times."
0:57 With threads we don't have this
0:58 certainly with multi-processing in Cython
1:00 we don't have this. So where are we on this landscape?
1:02 We're in this green AsyncIO area
1:05 and of course, Trio and Unsync are built on top of that.
1:08 So, I kind of highlighted that as well
1:09 but we're not going to talk explicitly about those yet.
1:12 This is the foundation of those libraries.