Skip to content
Discussion options

You must be logged in to vote

The thing is that you're calling a blocking synchronous function on a coroutine and it will block the event loop. Possible solutions are:

  1. Make health() synchronous i.e. remove the async. This way it will run in another thread.
  2. Use the @ArcLightSlavik approach, meaning that you await for the response. In other words, you give time on the event loop to other functions (root() in this case).

Approach 2 performs better.

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem question-migrate
6 participants
Converted from issue

This discussion was converted from issue #2601 on February 27, 2023 23:33.