Message310843
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. |
|
Date |
User |
Action |
Args |
2018-01-27 05:38:11 | socketpair | set | recipients:
+ socketpair, asvetlov, yselivanov |
2018-01-27 05:38:11 | socketpair | set | messageid: <1517031491.22.0.467229070634.issue32684@psf.upfronthosting.co.za> |
2018-01-27 05:38:11 | socketpair | link | issue32684 messages |
2018-01-27 05:38:10 | socketpair | create | |
|