Hello, as title says I would like to know how to kill the entire process if a thread is killed/paused/etc.
There are tools to stop or kill individual threads and I don't want to let my users run the program removing an important thread, so how do I prevent this?
Anything that closes/crashes/stops the process works.
Thank you.
How to stop the entire process if a thread is terminated Topic is solved
Re: How to stop the entire process if a thread is terminated Topic is solved
You can check if threads are running using ahkReady, you can set up a timer routine to check periodically.
Re: How to stop the entire process if a thread is terminated
Nice thank you!.
Last question:
If I have 2 threads, the main one and 1 created from the main one, how can I check if the main thread has been stopped/paused.
I mean something like:
Last question:
If I have 2 threads, the main one and 1 created from the main one, how can I check if the main thread has been stopped/paused.
I mean something like:
Code: Select all
#persistent
SubThread=
(
#persistent
settimer, CheckMainThread, 100
return
CheckMainThread:
; What to put here since I don't have any Object for the main Thread.
return
)
a := AhkThread(SubThread)
settimer, CheckSubThread, 100
return
CheckSubThread:
if !(a.ahkReady())
msgbox SubThread Stopped
Re: How to stop the entire process if a thread is terminated
call AhkExported() in the sub-thread to get a handle to main thread
Who is online
Users browsing this forum: No registered users and 27 guests