buu wrote:
I have a thread that ends with system.threading.thread.currentThread.Abort()
method..
.
Don't do that. Ever.
but, it throws me an exception..
is there any other way to end a thread?
Sure! Just return from your thread routine and the thread will be over.
To end a thread from another thread, set a boolean, then have the thread
that needs to end check for that boolean and return from its thread routine.
The only safe (and dare I say useful) way to end a thread is by explicitly
synchronizing. There is no safe way to simply "end" a thread without knowing
what it's doing, so it's better to let the thread end itself by signaling it.
--
J.