This is a document full of notes of all the things that have hung me up getting into Python's new asyncio library. I mostly use it for tools that schlep data around between file systems, databases, and search engines for work. So lots of io. Usually I use gevent and python 2.7. But recently I've been trying to get more into asyncio and here I'm going to document all the things that I felt important to know or that tripped me up.
The first thing you need to do is write some coroutines without asyncio. This means understanding the yield
keyword and how it can be used to create generators. Then next the protocol for sending/receiving from generator objects.
Recall generators are a special kind of iterator. When you specify a generator like so, you can use it in a for loop:
def generator()
for i in range(0, 5):