Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2699 Widoki

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

    


Awatar
Odrzuć
2023 looking for the same solution


Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
paź 23
5829
0
maj 22
656
2
lip 25
2911
2
cze 25
1780
0
maj 25
14