import asyncio async def pomme(): while True: await asyncio.sleep(1) print("pomme") async def poire(): while True: await asyncio.sleep(5) print("poire") async def main(): while True: await pomme() await poire() if __name__ == "__main__": loop = asyncio.get_event_loop() loop.run_until_complete(asyncio.gather(pomme(), poire()))