Bob,
You ^could^ call the ExitThread API to exit the thread. However, the
managed concept of a Thread and the actual implementation may not always be
in synch (also, if this thread is from the thread pool, then the results are
unpredictable as well). It is possible that in the future that fibers will
be used to support the managed concept of a thread, for example.
If anything, I would use return values from a method or some other
indicator to exit a thread, not using ExitThread. It just seems like a bad
implementation to "bash" the thread like that.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"Bob Rock" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> coming from win32 API I recall an ExitThread() call to gently terminate a
> thread from inside the same thread .... but now all I can see is an Abort
> call which seems to me a wrapper on the TerminateThread() Win32 API which
is
> a brutal way to end a thread. Is there any other more gentle way to close
a
> thread???
>
> Bob Rock
>
>
>