Terminate Unresponding Thread


#1

Is it possible within an application to have a thread terminate another thread that has stopped responding?

I have a thread that “pings” the SQL Database to determine if it up and running. On occasion after the server with the database has been rebooted, this thread get hung up query the table properties, (SQLUpTable{PROP:Owner} and SQLUpTable{PROP:ConnectString}) When this occurs, I would like to have another thread, maybe the main thread to terminate the hung thread and respawn the thread to continue to “ping” the database.


#2

You didn’t specify Clarion version. C10 introduced WorkingThreadManager class to maintain threads, seems it is what you are searching for.


#3

Thanks for the response, I am using C10. I will look into that class.


#4

https://www.litreum.com/?articleId=3584