import asyncio import time t1 = time.time() async def fetch_posts(arg): await asyncio.sleep(arg) print("Fetched all posts") async def fetch_users(arg): await asyncio.sleep(arg) print("Fetched all Users") async def main(): await asyncio.gather(fetch_posts(2), fetch_users(1) ) print("Finished in", time.time() - t1, "secs") loop = asyncio.get_event_loop() loop.run_until_complete(main())