If you abort an asnc thread with something like thread abort I believe it
throws an unhandled exception, which can leave your objects in an ustable
state, hence my suggestion to use a controller value to terminate and exit
the thread cleanly. If you've managed to get it running to exit sub and die
cleanly then stick with it.
Regards
John Timney (MVP)
http://www.johntimney.com
"Chip" <ch**@intradata.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
This approach has the parent process ending the thread. The test is in the
thread itself so it needed to be a self-abort. There doesn't seem to be a
good way to do it based on what I've been able to research, so since the
easy way out is not there, I restructured the code so I could just use
"exit sub".
Thanks for the reply,
Chip
"John Timney (MVP)" <x_****@timney.eclipse.co.ukwrote in message
news:IL********************@eclipse.net.uk...
>Best way is probably to have a field visible to the thread thats not
controlled by the async thread and have the asyn thread check if the
value signifies abort. Perhaps a value available in Context, session or
application that the async thread can periodically look at.
Regards
John Timney (MVP)
http://www.johntimney.com
"Chip" <ch**@intradata.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>>I need to have an asynch thread abort itself. Something akin to a STOP.
The thread that spawned it cannot access it so it must done within the
thread.
Chip