Hi,
I've come across another problem with tclBlend. Note to people who have
seen some of my other postings on this list: I am no longer using Tcl
threads with tclBlend, nor am I trying to load the Tcl interpreter from
Java (I have Tcl start Java, the old fashioned way), so the problems I am
talking about here are independent of those other problems.
Synopsis: if you start up a Java program from Tcl and that Java program
creates multiple threads that try to invoke tcl.lang.Interp.eval() (with
appropriate synchronization so they are not interspersing commands with
each other), the threads hang waiting for the eval call to complete. I
have attached 3 files to demonstrate this problem: README.txt provides a
more detailed explanation, doit.tcl is the top-level script to source from
within tclsh, and Try.java is the Java program that doit.tcl tries to run.
I have a workaround, namely, setting up a queue inside my Java program into
which Tcl scripts are inserted by the threads needing them executed and
from which the main thread pulls out scripts and executes them. But I
think it'd be good to figure out what's going on in the tclBlend code here...
thanks,
- Mike
doit.tcl
Readme.txt
Try.java