On Apr 10, 8:28 am, "Christian Vest Hansen" <[EMAIL PROTECTED]> wrote: > > Interrupting a thread does not, to the best of my knowledge, guarentee > that an arbitrary body of code will actually stop running. If the code > does not invoke any method that might throw some InterruptedException, > then the onus is on the programmer (of said body of code) to check > what Thread.interrupted() says at regular intervals.
Ah, makes sense. But I guess I'm having trouble thinking of legitimate uses of WITH-TIMEOUT that don't end up blocking on an interruptable method. If the arbitrary code in the block is itself an interpreter for another kind of arbitrary code from somewhere else (for example, you're using WITH-TIMEOUT around the evaluation of an untrusted regular expression), you probably want strict control over other things such as heap used too. Which leads me to think that this is a use case for something like MVM: http://java.sun.com/developer/technicalArticles/Programming/mvm/ Though I don't know if that's still being actively developed. The Emacs Lisp WITH-TIMEOUT implementation seems to have the exact same limitation that the JVM's Thread.interrupt() does. I'm curious, is this another Lisp platform? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
