[Mono-dev] Re: Thread Abort() sometimes fails in mono

Robert Jordan robertj at gmx.net
Tue Apr 4 14:49:15 EDT 2006


Felipe Almeida Lessa wrote:
> Em Ter, 2006-04-04 às 19:23 +0200, Robert Jordan escreveu:
>> Felipe Almeida Lessa wrote:
>>> Em Ter, 2006-04-04 às 08:26 -0600, Wade Maxfield escreveu:
>>>> Hi,
>>> Hi! Correct me if I'm wrong but...
>>>
>>>> /*doesn't always work ---->*/    Global.WebThread.Abort();
>>> You shouldn't be using Thread.Abort, right? AFAIK, this is a bad way of
>>> killing threads.
>> Thread.Abort() is harmless and more like an exception than a killer.
> 
> Or not. A quick Google search[1] yields as the second result
> http://www.interact-sw.co.uk/iangblog/2004/11/12/cancellation (and the
> first result cited this one).

Calling someOtherThread.Abort() is of course evil. I was not aware
that Abort() is not static. But Thread.CurrentThread.Abort() is
really harmless ;-)

Robert




More information about the Mono-devel-list mailing list