Working in Common Lisp on the JVM, I wish to emulate the semantics of a typical thread library (there is nothing in ANSI about such interfaces, they vary widely)
(WITH-TIMEOUT timeout &REST body) which runs an arbitrary BODY of code on a new thread until TIMEOUT seconds have elapsed, upon which the thread is terminated unceremoniously. The typical way to emulate the dangerous java.lang.Thread.stop() type interfaces to run Java threads on a heartbeat loop which terminates if a condition is met (like a global static variable of primitive type boolean turns false), but I am unable to do this for arbitrary code where I don't know where the "safe" loops. Short of instrumenting the Java bytecode associated with the invocation of BODY with synthetic handlers, does someone have a clever hack to get the JVM to emulate interruptible threads? Mark Evenson --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
