When calling the app.run() method in the main function, it blocks the thread as expected. However, when running it in a thread, it doesn't block, which causes the HTTP service to fail. #1817
Unanswered
LetAmericaGreatAgain
asked this question in
Q&A
Replies: 2 comments
|
Your code mentions the |
0 replies
|
It doesn't block because there is nothing to run. When you call run in another thread, it will use that thread's loop. But you have registered stuff in the main thread's loop. run() uses thread local Loop. So you are trying to run another loop. You need to register stuff on the same thread that runs the app. Or, simply, you just need to stop using threads, since the library is single-threaded (with exceptions) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
When calling the app.run() method in the main function, it blocks the thread as expected. However, when running it in a thread, it doesn't block, which causes the HTTP service to fail.
All reactions