Closed byew closed 1 year ago
Please don't write issues when you have questions. I'd appreciate it if you follow the instructions and use the discussions board for questions. Thank you.
Regarding your question, I suggest you become familiar with how concurrency works in eventlet.
ok,thank you!
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: