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

Wade Maxfield wmaxfield at gmail.com
Tue Apr 4 15:16:17 EDT 2006

  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?


   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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060404/40b8d76f/attachment.html 

More information about the Mono-devel-list mailing list