How I call an async function without await? How I call an async function without await? python python

How I call an async function without await?


One way would be to use create_task function:

import asyncioasync def handler_message(request):    ...    loop = asyncio.get_event_loop()    loop.create_task(perform_message(x,y,z))    ...


Other way would be to use ensure_future function:

import asyncioasync def handler_message(request):...loop = asyncio.get_event_loop()loop.ensure_future(perform_message(x,y,z))...