I am writing a multi-threaded Python application that makes many TCP connections on servers. Each connection is performed in a separate thread. Sometimes the thread hangs for a long time, which I do not want. How can I make a thread kill itself after a certain period of time? From the main thread, how can I determine if the child thread killed itself?
If possible, I would appreciate a piece of code showing how to do this. Thanks.
Ubuntu System Update 9:10
VacuumTube
source share