We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66a3b87 commit 2199412Copy full SHA for 2199412
test/test_async.py
@@ -15,9 +15,13 @@ async def main():
15
task = asyncio.create_task(my_func())
16
res = await asyncio.gather(task)
17
18
+async def main_legacy():
19
+ future = asyncio.ensure_future(my_func())
20
+ res = await asyncio.gather(future)
21
+
22
if __name__ == '__main__':
23
if sys.version_info >= (3, 7):
24
asyncio.run(main()) # main loop
25
else:
26
loop = asyncio.get_event_loop()
- loop.run_until_complete(main())
27
+ loop.run_until_complete(main_legacy())
0 commit comments