Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2857 มุมมอง

Hi guys,

I have got the following context, i need to call a webapi from python method but i don't want to blocking UI until webapi responde the result.

I did with async/await but i don't get the result, can be that i am doing something bad, can anybody help me to solver it.


example:


async def fn(self):

    result = await callapi-************

    return result


def call_async_method(self):

    asyncio.run(self.fn())

    


อวตาร
ละทิ้ง
2023 looking for the same solution


คำตอบที่ดีที่สุด

Hi! im looking for the same solution... Can you resolve this?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ต.ค. 23
6042
0
พ.ค. 22
656
1
ก.ค. 25
2353
2
ก.ค. 25
7837
2
ก.ค. 25
4231