Author Justin Mayfield
Recipients Justin Mayfield, gvanrossum, haypo, thehesiod, yselivanov
Date 2015-11-12.01:10:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1447290628.95.0.998122845808.issue25593@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2015-11-12 01:10:28Justin Mayfieldsetrecipients: + Justin Mayfield, gvanrossum, haypo, yselivanov, thehesiod
2015-11-12 01:10:28Justin Mayfieldsetmessageid: <1447290628.95.0.998122845808.issue25593@psf.upfronthosting.co.za>
2015-11-12 01:10:28Justin Mayfieldlinkissue25593 messages
2015-11-12 01:10:28Justin Mayfieldcreate