Skip to content

Instantly share code, notes, and snippets.

Created October 23, 2020 05:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
import asyncio
async def async_func(task_no):
print(f'{task_no} :Velotio ...')
await asyncio.sleep(1)
print(f'{task_no}... Blog!')
async def main():
taskA = loop.create_task (async_func('taskA'))
taskB = loop.create_task(async_func('taskB'))
taskC = loop.create_task(async_func('taskC'))
await asyncio.wait([taskA,taskB,taskC])
if __name__ == "__main__":
loop = asyncio.get_event_loop()
except :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment