This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Thread-safe eval()
- From: Jost Boekemeier <jost2345 at yahoo dot de>
- To: Per Bothner <per at bothner dot com>
- Cc: kawa at sources dot redhat dot com
- Date: Tue, 2 Nov 2004 18:15:20 +0100 (CET)
- Subject: Re: Thread-safe eval()
> Hm. I would expect that to work. Which version of
> Kawa are you using?
1.7, from ftp://ftp.gnu.org/pub/gnu/kawa/kawa-1.7.jar.
Version 1.6.70 was okay, as far as I remember.
> Otherwise, could you send a self-contained testcase
I don't know how such a test case should look like;
attached is a simple java file which shows the
problem.
Jost
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
import java.lang.*;
import kawa.standard.*;
public class test implements Runnable {
public void run() {
try {
while (true) {
Scheme s = new Scheme();
s.eval(" (letrec ((f (lambda(v) (if (= v 0) 1 (* (f (- v 1)) v))))) (f 155)) ");
}
} catch(Throwable t) {t.printStackTrace();}
}
public static void main(String s[]) throws Throwable {
(new Thread(new test())).start();
(new Thread(new test())).start();
(new Thread(new test())).start();
(new Thread(new test())).start();
Thread.sleep(10000);
}
}