Re: Safely implementing Thread.Abort
Rhys Weatherley <[email protected]>
| Newsgroups | gmane.comp.gnu.dotgnu.developer |
|---|---|
| Organization | Southern Storm Software, Pty Ltd |
| Message-ID | <[email protected]> |
On Thursday 20 May 2004 08:13 am, Thong (Tum) Nguyen wrote: > Rats; I forgot about that. How about making a copy of the code for the > current method and then modifying the instruction pointer for the thread to > the appropriate place in the new code? How exactly are you going to do that? The CVM instruction pointer is probably going to be in a register (esi on x86). You cannot guarantee that the CVM instruction pointer is in "thread->pc" when an abort occurs. > I hope we can find a better (faster!) way because ASP.NET will use > Thread.Abort and so will AppDomain.Unload (not as serious here because > abort is called internally) :-(. The problem of inline modification and PC redirection is intractable without adding a mutex around every instruction's execution. Believe me, I've tried. Cheers, Rhys.