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

Lluis Sanchez lluis at ximian.com
Tue Apr 4 16:25:58 EDT 2006

El mar, 04-04-2006 a las 13:16 -0600, Wade Maxfield escribió:
>   Well, to get back to the original question...
>   When doing a web request, or perhaps when printing to the console,
> sometimes the Abort() call from the main thread to the webthread does
> not abort the webthread.
>    Is this a bug, or is it expected?

This might be a bug. If you have a simple test app that can be used to
reproduce the problem, file a bug in bugzilla.ximian.com and attach it

> thanks,
> wade
> P.S.
>    I read the article Felipe pointed to.  
>    There is a well taken point in the article.  That point is you
> don't know what state the thread is in when doing the abort.  Abort()
> creates an exception and can leave things hanging.
>     In all the programs I've written, when I leave the world, I don't
> care what the code was doing, I sometimes just want it to stop.
> Generally, with a well managed OS, you'll have files closed and memory
> released.  The files may be incomplete, but that is what happens if
> you quit too soon.
>    If you are writing a "monitor" application whose job is to monitor
> but not change the state of things, Abort() is acceptable when
> exiting.  If you are writing a financial package, Abort() is not
> acceptable during a disk write of your bank's latest transaction to
> your checking account.
>   Abort() should guarantee exiting, IMHO, due to historical usage of
> abort in the computing world.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

More information about the Mono-devel-list mailing list