标签:asyncio name res print sync 协程 pre loop word
loop = asyncio.get_event_loop() get_future = asyncio.ensure_future(main(name, password, "1234")) # 相当于开启一个future main是方法 loop.run_until_complete(get_future) # 事件循环 print(get_future.result()) # 获取结果
标签:asyncio name res print sync 协程 pre loop word
原文地址:https://www.cnblogs.com/itBlogToYpl/p/13153770.html