asyncio
asyncio copied to clipboard
asyncio historical repository
The following code prints uncaught handler exception but shouldn't ``` import asyncio import contextlib import aiohttp async def main(url): async with aiohttp.ClientSession() as session: with contextlib.suppress(Exception): async with session.get(url): await...
My python version is 3.5.2 The following example illustrates the problem: ``` python import asyncio class Foo: async def __await__(self): return "Foo" async def run_foo(): foo = Foo() return await...
Hello, I was experimenting with `asyncio` a lot lately and I noticed that it provides very small support for writing asynchronnous UDP applications. I wanted to write a very simple...
Hi, Subprocess creation is handled by `loop.subprocess_exec()` and `loop.subprocess_shell()`. Both uses `subprocess.Popen()`, but the later performs at least one blocking read on a pipe (on unix at least), used to...
``` Currently, asyncio calls the standard getaddrinfo() function in a thread because this function is blocking. There is no standard asynchronous functio to resolve an host name. It would be...
`StreamReader.readexactly` is a very handy method to implement reading frames ('chunks' of data preceded with the size of the 'chunk') from a stream. E.g.: ``` python frame_len = yield from...
Long story short, one should never try to fork in a running event loop. Things that will break: 1. kqueue/epoll selectors will (likely) error with `EBADF` as soon as the...
Things like Queue have self._loop reference. If you change the loop, suddenly you have weird errors occuring and you need to hunt down every single object having a reference to...
Lots of asyncio primitives and operations have a keyword argument `loop=None`. I cannot find an explanation of it in the docs (doesn't mean it doesn't exist, just that I can't...
Can someone add this to the docs? Thanks a lot!