> The two threads are in a forever loop doing something. How do I kill
> these two threads externally from the process that launches them? The
> threads themselves have logic inside to exit when something happen but I
> also want to be able to terminate the threads outside the threads.
There are two things to be aware of: (1) terminating a thread (any
thread) is an unsafe operation, and isn't something you want to be doing
unless you are bringing down your application, and (2) you can't
terminate a ThreadPool thread directly. If you *must*, then create your
own threads that you can terminate.
The best approach when your threads are constantly busy (usually this
means in a loop) is to have some boolean field that your methods can
see, and for them to poll this variable and quit when the value changes.
-- Barry