Replies: 1 comment
-
The answer is the same. You have to familiarize yourself with how eventlet does concurrency. If you want a more predictable concurrency model, then uninstall eventlet and use the |
Beta Was this translation helpful? Give feedback.
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.
-
Describe the question
I am trying to complete a python backend server so that it could send messages to the front webpage when I receive data from Kafka.
I found that when I use
time.sleep(1)
or don't usesocketio.sleep(1)
or useeventlet.monkey_patch()
+socketio.sleep(1)
, the backend cannot use socketio.emit to send messages to the frontend webpage.. But when I usesocketio.sleep(1)
or useeventlet.monkey_patch()
or useeventlet.monkey_patch()
+time.sleep(1)
, the program runs fine.I don't know why this happens, so I want to ask everyone what the reason is?
Below is my code:
Beta Was this translation helpful? Give feedback.
All reactions