Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2824 Lượt xem

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())

    


Ảnh đại diện
Huỷ bỏ
2023 looking for the same solution


Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 23
6016
0
thg 5 22
656
1
thg 7 25
2338
2
thg 7 25
7827
2
thg 7 25
4220