dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Safely implementing Thread.Abort


From: Rhys Weatherley
Subject: Re: [DotGNU]Safely implementing Thread.Abort
Date: Thu, 20 May 2004 08:18:36 +1000
User-agent: KMail/1.4.3

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]