31. ИТЕРАЦИЯ EVENT LOOP
def run_forever():
while True:
events = selector.select(timeout)
for key, mask in events:
if mask & EVENT_READ:
key.reader(key.fileobj)
if mask & EVENT_WRITE:
key.writer(key.fileobj)
for handler in ready:
handler._run()
36. PYTHONASYNCIODEBUG=1
async def f():
fut = asyncio.Future()
fut.set_exception(RuntimeError())
del fut
...
ERROR:asyncio:Future exception was never retrieved
future: Future finished exception=RuntimeError()
RuntimeError
37. $ PYTHONASYNCIODEBUG=x python myapp.py
ERROR:asyncio:Future exception was never retrieved
future: Future finished exception=RuntimeError() created at filename.py:10
source_traceback: Object created at (most recent call last):
...
File "filename.py", line 10, in f
fut = asyncio.Future()
RuntimeError