[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [DotGNU]Safely implementing Thread.Abort
From: |
Thong (Tum) Nguyen |
Subject: |
RE: [DotGNU]Safely implementing Thread.Abort |
Date: |
Thu, 20 May 2004 18:09:40 +1200 |
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:address@hidden
> 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
> address@hidden
> http://dotgnu.org/mailman/listinfo/developers
- [DotGNU]Safely implementing Thread.Abort, Thong (Tum) Nguyen, 2004/05/19
- RE: [DotGNU]Safely implementing Thread.Abort, Thong (Tum) Nguyen, 2004/05/20
- RE: [DotGNU]Safely implementing Thread.Abort, Thong (Tum) Nguyen, 2004/05/20
- RE: [DotGNU]Safely implementing Thread.Abort, Gopal V, 2004/05/20
- RE: [DotGNU]Safely implementing Thread.Abort, Thong (Tum) Nguyen, 2004/05/20