After I CTRL+C to kill the python program, I found most of the threads and processes has been terminated (they are watching some flags), but still some are running in background without any output to console. Is there a way that I can investigate which one is still running?
If you suggest to print something when thread/process is running, it seems not gonna work. First, some of the threads/processes are running methods in third party libraries, for example, websocket.run_forever. Second, for those threads/processing running my method, I'm pretty sure they are monitering a flag and once it's set, they all quit. For those threads/processes running third party methods, I call some methods to terminate them like websocket.close() and I do see they are terminated. So in this case, it's confusing to me what is still running.