I have this configuration
async def A():
B()
async def C():
# do stuff
def B():
# do stuff
r = C()
# want to call C() with the same loop and store the result
asyncio.run(A())
I don't really know how to do that. I tried this by reading some solutions on the web:
def B():
task = asyncio.create_task(C())
asyncio.wait_for(task, timeout=30)
result = task.result()
But it doesn't seem to work...