by joe.pesch
19. May 2019 16:26
import asyncio
import time
async def px(x):
time.sleep(5)
print(x + ': ' + str(time.time()))
async def main():
x = px('x')
print("main1")
y = px('y')
print("main2")
asyncio.ensure_future(y)
asyncio.ensure_future(x)
asyncio.run(
main())
input()
e5e44f68-2dc9-48c9-8109-aa53d4064cc3|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
Python