[phobos] parallelism segfaults

David Simcha dsimcha at gmail.com
Wed Sep 14 12:07:21 PDT 2011


I don't know much about these kinds of internals.  I just assumed it was
feasible because things like SIG_TERM get sent somehow when you kill a
process on Linux.

On Wed, Sep 14, 2011 at 2:53 PM, Sean Kelly <sean at invisibleduck.org> wrote:

> On Sep 14, 2011, at 10:03 AM, David Simcha wrote:
>
> > How about this:  Could we send all daemon threads hardware exceptions
> after joinAll()?  In the vast majority of cases, locks will be scoped,
> either through synchronized blocks or simple scope(exit) mutex.unlock() type
> statements.  If they're not then they should be.  (If any still aren't in
> std.parallelism then I'll fix this.  I originally made a few non-scoped
> around code that couldn't throw, but this was silly and I think I changed
> all of them.)  This way daemon threads terminate immediately, locks get
> released if the code's well-written,
> > and if you **really** need to do some cleanup, you can catch the
> exception.
>
> How would we do this?  Signals don't cause an exception to be thrown
> (because it's technically illegal to throw from a signal handler).  Is there
> some other way we could sent a hardware exception to a thread that would
> cause it to terminate cleanly?
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110914/4f837f86/attachment.html>


More information about the phobos mailing list