This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author socketpair
Recipients asvetlov, socketpair, yselivanov
Date 2018-01-27.05:38:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za>
In-reply-to
Content
Proof:

================
import asyncio

async def test():
    while True:
        print('sleeping 1')
        await asyncio.gather(asyncio.sleep(1), return_exceptions=True)

async def amain():
    print('creating task')
    qwe = asyncio.Task(test())
    print('sleeping 2')
    await asyncio.sleep(2)
    print('cancelling task')
    qwe.cancel()
    print('waiting task for completion')
    try:
        await qwe
    except Exception as e:
        print('task complete: %r', e)

loop = asyncio.get_event_loop()
loop.run_until_complete(amain())

================

This program will never complete.

This case should be either fixed, or documented.
History
Date User Action Args
2018-01-27 05:38:11socketpairsetrecipients: + socketpair, asvetlov, yselivanov
2018-01-27 05:38:11socketpairsetmessageid: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za>
2018-01-27 05:38:11socketpairlinkissue32684 messages
2018-01-27 05:38:10socketpaircreate