Subj : Re: kill executing script... To : Oystein Hallaraker From : Brendan Eich Date : Tue Jun 29 2004 11:56 am Oystein Hallaraker wrote: > I tried returning false to the jsengine from a native() call, and that > will stop execution of the current script. But what I really wanted was > a way to asyncronously stop the script execution (without having to > return false to the engine). Is this possible? Asynchronous is overloaded in modern software practice. Do you mean (a) stop the script execution from another thread, or (b) have the native method suspend the script such that the current thread sees a return from whatever JS_EvaluateScript API (e.g.) call it made, but can resume execution later where the script left off? Again, (a) is a matter of causing some native, or some hook such as the branch callback, to return false. With multiple threads, you can use conditions and locks to signal and probe appropriately. NSPR provides portable veneer. /be .