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 15:02:21 +1000
User-agent: KMail/1.4.3

On Thursday 20 May 2004 02:58 pm, Russell Stuart wrote:

> And that assumes your signal() handler checked you were
> in the interpreter to start with, so it wouldn't leap out
> of some critical piece of code such as the GC.

There are ways of dealing with that in the JIT.  e.g. Mono sets a flag to 
indicate if the current thread is in managed or unmanaged code.  The flag is 
changed upon transitions between the two worlds.  If the flag is set to 
"unmanaged", then the signal handler won't throw immediately, but will set 
the "abort requested" flag.  Upon returning to managed code, the abort flag 
is checked.

> I am not sure if a function return would be expensive
> under the JIT, but that is the JIT authors problem.
> By all reports he is a very capable man.

That he is. :-)

Cheers,

Rhys.



reply via email to

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