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.<br><br><div class="gmail_quote">On Wed, Sep 14, 2011 at 2:53 PM, Sean Kelly <span dir="ltr"><<a href="mailto:sean@invisibleduck.org">sean@invisibleduck.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sep 14, 2011, at 10:03 AM, David Simcha wrote:<br>
<br>
> 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,<br>
> and if you **really** need to do some cleanup, you can catch the exception.<br>
<br>
</div>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?<br>
<div><div></div><div class="h5">_______________________________________________<br>
phobos mailing list<br>
<a href="mailto:phobos@puremagic.com">phobos@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br>
</div></div></blockquote></div><br>