It should work. What is the JVM environment you are using? Is it 1.2,
native thread?
-- Jiang Wu
[EMAIL PROTECTED]
> -----Original Message-----
> From: Mike Schwartz [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 25, 2000 9:52 PM
> To: Jiang Wu; Mo DeJong
> Cc: [EMAIL PROTECTED]
> Subject: tcl Blend and Java threads...
>
>
> Hi,
>
> I read Jiang's paper -- very helpful, thanks.
>
> So, I tried to follow the example in the section "Allocate a Tcl
> Interpreter Thread"
> (http://www-cs-students.stanford.edu/~jwu/Using_Tcl_in_Java.ht
> ml#9), but
> what I wrote doesn't work. Here's the code:
>
> import tcl.lang.*;
> public class Try {
> public static void doit() {
> System.out.println("pt0");
> (new TclThread()).start();
> System.out.println("pt1");
> }
> private static class TclThread extends Thread {
> Interp myInterp;
> public void run() {
> System.out.println("pt2");
> myInterp = new Interp();
> System.out.println("pt3");
> }
> }
> }
>
> It hangs after printing "pt2" (specifically, it prints pt0,
> then pt2, then
> pt1, and never gets to pt3). So, I don't seem to be able to
> create the
> single dedicated Tcl interpreter thread in anything but the main
> thread. What did I do wrong?
>
> Thanks
> - Mike
>
----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
An archive is available at http://www.mail-archive.com/tcljava@scriptics.com