Closed makaveli10 closed 1 year ago
You monkey patched threads, so they are async. So it all runs on one thread. In your infinite loop you need sleep (depending what else is in the threaded function) for any of the other "async threads" to do anything.
If you need true threads, I'd use another python process for the threaded stuff.
https://eventlet.net/doc/modules/greenthread.html#eventlet.greenthread.sleep
I cannot start the second thread with the first thread having an infinite loop. I want to know if
socketio
runs threads in the background? If so, why it waits for the first thread to finish up?Below is my code: