Closed JerzySpendel closed 7 years ago
Growler accepts both normal functions and coroutine functions as middleware, and will handle each appropriately.
Just adorn the function with @asyncio.coroutine
and you can yield from
all you like.
Example 2 demonstrates this.
Note, I'm going to drop py3.4 support with my next version (v0.9.x), and I recommend using async
& await
notation instead of asyncio.coroutine
Ok, super! :) I didn't find this example in documentation.
Let's take a look at the documentation example:
Is
index_file
a coroutine from which I could do ayield from
?