on-internet
← Community

How to check if a TThread is still running?

Stack Overflow ·

I am using TThread. I just need to find out if a thread is still running and terminate the application if it takes too long. Ex: MyThread := TMyThread.Create; MyThread .Resume; MyThread.Terminate; total := 0; while MyThread.isRunning = true do // < i need something like this begin // show message to user to wait a little longer we are still doing stuff sleep(1000); total := total + 1000; if total > 60000 then exit; end; Is this possible with Delphi?

Comments

Sign in or sign up to comment and upvote.

No comments yet.