Re: interrupts

Turadg Aleahmad <[email protected]>
Newsgroups gmane.comp.java.sisc.devel
Message-ID <[email protected]>
[email protected] wrote:

> But when I run this Scheme code:
>
>>>(define (go) (go))
>>>(go)
>>>      
>>>
>>and try to break it by setting "interrupt" of the ThreadContext, it 
>>won't stop.
>>    
>>
>
>What version btw?  In CVS, the following works:
>

I'm not certain what version.  I think I built it ~6 weeks ago from 
CVS.  There appears to be no symbol defined with the SISC version.  
Wouldn't that be useful?

In any case, your example code does work as advertised with the build 
I'm using.  But I have a slightly different need and I don't know how to 
implement it.

We've got a JFrame with a SISC console in it.  (see 
http://turadg.ucdev.org/jist/callListener.php )  We're using a custom 
JStyledTextPane instead of the REPL to get syntax highlighting etc.  
There's a break button in the upper left.  We want that to interrupt the 
execution of whatever's happening in the console and return the 
environment to a safe state.  The button is coded to execute

interpreter.tctx.interrupt = true;

which evidently worked before (1.7?).  It no longer does anything as far as I can tell.

What should the button be doing?  On evaluation, do I have to explicitly create a Scheme thread and stick the evaluation inside?  If so, how can I do this in Java-land?




-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.