RE: Safely implementing Thread.Abort

"Thong (Tum) Nguyen" <tum-x2aT3/[email protected]>
Newsgroups gmane.comp.gnu.dotgnu.developer
Message-ID <[email protected]>
If an unmanaged/managed flag is acceptable then I think we can handle aborts
with the CVM in the same way right now.  The SEGV exception handler I worked
on does something similar in that it can longjump back to the CVM and throw
and exception from there.  I wasn't sure whether the flag check on every
internal call was worth it but it looks like the only choice considering my
code rewriting idea has no chance of working :(.

Regards,

^Tum

> -----Original Message-----
> From: Rhys Weatherley [mailto:[email protected]]
> Sent: Thursday, 20 May 2004 5:02 p.m.
> To: Russell Stuart; Thong (Tum) Nguyen; DotGnu-Develop
> Subject: Re: [DotGNU]Safely implementing Thread.Abort
> 
> 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.
> 
> _______________________________________________
> Developers mailing list
> [email protected]
> http://dotgnu.org/mailman/listinfo/developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.