This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Thread-safe eval()
- From: William Shulman <will at mercedsystems dot com>
- To: Jost Boekemeier <jost2345 at yahoo dot de>
- Cc: kawa at sources dot redhat dot com
- Date: Mon, 1 Nov 2004 10:59:49 -0800
- Subject: Re: Thread-safe eval()
- References: <20041101175550.64885.qmail@web60104.mail.yahoo.com>
you can try using the 'synchronized' form:
http://www.gnu.org/software/kawa/Miscellaneous.html#Miscellaneous
Jost Boekemeier writes:
> Hi,
>
> kawa fails to run the following simple test code
>
> Scheme s = new Scheme();
> s.eval(" (letrec ((f (lambda(v) (if (= v 0) 1 (* (f (-
> v 1)) v)))))(f 155)) ");
>
> when the above code is evaluated in more than one
> thread. How do I write the above code so that it can
> be evaluated in more than one thread at the same time?
>
>
>
> java.lang.ArrayIndexOutOfBoundsException: 400
>
> at
> gnu.mapping.Binding.hashSearch(Binding.java(Compiled
> Code))
> at
> gnu.mapping.Binding.hashSet(Binding.java:236)
>
>
>
> java.lang.Error: ambiguous call to
> getDeclaredMethod("writeValues", 2)
> -
> gnu.mapping.Values.writeValues(java.lang.Object,gnu.lists.Consumer)void
>
> -
> gnu.mapping.Values.writeValues(java.lang.Object,gnu.lists.Consumer)void
>
> at
> gnu.bytecode.ClassType.getDeclaredMethod(ClassType.java:535)
>
> at
> gnu.expr.ConsumerTarget.compileFromStack(ConsumerTarget.java:70)
>
> at
> gnu.expr.ApplyExp.compile(ApplyExp.java:236)
>
>
>
>
>
>
>
>
>
>
> ___________________________________________________________
> Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de