Closed Nibba2018 closed 2 years ago
@Nibba2018 do you think this PR will make a better default example than the synced version?
@eldadfux , I did some tests and found that this takes the same amount of time to execute compared to the synced version. So I am still a bit doubtful whether this is truly asynchronous. I think we have to implement __await__()
for sdk classes to get better results. I am currently creating a detailed issue on sdk-generator
.
This won't work because there isn't any awaitable coroutine in your asynchronous functions. This will just run synchronously and will take more time then synchronous counterpart due to the additional overhead of the event loop. You have two options to make it asynchronous either by running it in another thread by using run_in_executor or make the underlying library asynchronous. The first one is easy.
@Niraj-Kamdar , Okay let me try this.
Hi @eldadfux , I tried a workaround to run python playground asynchronously. Do have a look. This PR refers to this issue
API Calls