Justin Mayfield added the comment:

This code repros without aiohttp when pitted against the previously attached 
web server (again on OSX 10.11, mid-2012 MBPr).

Admittedly this may seem very arbitrary but I have better reasons in my 
production code for stopping an IOLoop and starting it again (which seems to be 
important to the reproduction steps).


import asyncio

loop = asyncio.get_event_loop()

def batch_open():
    for i in range(100):
        c = asyncio.ensure_future(asyncio.open_connection('127.0.0.1', 8080))
        c.add_done_callback(on_resp)

def on_resp(task):
    task.result()
    loop.stop()

loop.call_soon(batch_open)
while True:
    loop.run_forever()

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25593>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to