Closed Kalilamodow closed 2 months ago
If you are using gevent or eventlet, then this is expected. These frameworks suspend concurrency if you block. Use the sleep function provided by your framework of choice, or socketio.sleep()
.
And by the way, threads are also not well supported if you are using gevent or eventlet. Use socketio.start_background_task()
instead.
Describe the bug I have a separate background thread which creates and sends events to the clients. However, whenever there is any blocking functions in it, the events don't send.
To Reproduce Let's say this is the file:
As expected, it peppers the client's console with "hello". However, when I do this:
The client just doesn't seem to receive anything.
Logs The logs for both scenarios are the same - something like this