[Tcl Java] RE: [Tcl Java] Re: [Tcl Java] Multiple Tcl.lang.Interp in a single JVM

2000-07-26 Thread Marc Saegesser

Thanks.  I'll use Jacl for now and switch to TclBlend when it's ready.  If
there is anything I can do to help, let me know.


 The current Tcl Blend code does not work with multiple Tcl threads.
 There is a plan in place to remedy this situation, but we
 will not be able to post the details until the end of the week.

  If the paragraph quoted above still applies, then it looks like this
  approach won't work.  What if I switched to the Jacl intead of TclBlend?
  Could I use Jacl to create mulitple Tcl interpretters on
 separate threads
  inside a single JVM?

 You can always prototype the system in Jacl and move to Tcl Blend
 when the thread work is finished. Jacl does threads a lot better
 than Tcl Blend, at least for now. You should not have to rewrite
 anything, both Jacl and Tcl Blend support the same Tcl/Java API.

 Mo DeJong
 Red Hat Inc



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




[Tcl Java] RE: [Tcl Java] Re: [Tcl Java] Multiple Tcl.lang.Interp in a single JVM

2000-07-26 Thread Mo DeJong

On Wed, 26 Jul 2000, Marc Saegesser wrote:

 Thanks.  I'll use Jacl for now and switch to TclBlend when it's ready.  If
 there is anything I can do to help, let me know.

The best thing you can do as a "new user" is to keep a detailed log
of what problems you run into and what insights you have. For example,
if you just can't figure out how to put and event into the event
queue, make a note of that. Jot down what docs you looked at
and why you are still confused. When you figure the problem out,
log that and make sure you write down what info helped you figure
out what to do. This is really helpful because later you can look
at the log and notice "gee, if there were better docs in that
function or an example of X, I would not have been confused".
Getting things into an "easy to understand" state is really
hard, so we could really use you help on that.

Don't be afraid to download the CVS tree and rewrite any
documentation you find confusing.

Mo DeJong
Red Hat Inc


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




[Tcl Java] Re: [Tcl Java] Multiple Tcl.lang.Interp in a single JVM

2000-07-25 Thread Mo DeJong

On Tue, 25 Jul 2000, Marc Saegesser wrote:

 I just noticed in Jiang Wu's excellent "Embedding a Tcl Interpretter in
 Java" article
 (http://www-cs-students.stanford.edu/~jwu/Using_Tcl_in_Java.html) the
 following paragraph in the "Other Issues" section:
 
 TclBlend 1.2 does not support multiple Tcl interpreters in a
 Java program.  Do not try to create multiple "tcl.lang.Interp"
 instances.  Future version of TclBlend may support multiple Tcl
 interpreters in multiple threads.  In TclBlend, it is safe to create
 slave interpreters within the master interpreter as one could in any
 single threaded Tcl program.
 
 Is this still the case?  I had hoped to create a pool of threads, each
 running a separate Tcl interpreter.  A pool manager class would manage this
 collection of interpreters to create new ones when the pool gets low,
 harvest idle ones when the pool gets large.  All of these threads would be
 running inside a single JVM inside a servlet engine.  In response to HTTP
 requests, servlets could request an idle interpetter from the pool and ask
 it to run a script.  There may be several scripts active any given time and
 the scripts may block for relatively long periods.  There is no need for
 scripts executing in separate interpretters to communicate or even know
 about each other.

The current Tcl Blend code does not work with multiple Tcl threads.
There is a plan in place to remedy this situation, but we
will not be able to post the details until the end of the week.

 If the paragraph quoted above still applies, then it looks like this
 approach won't work.  What if I switched to the Jacl intead of TclBlend?
 Could I use Jacl to create mulitple Tcl interpretters on separate threads
 inside a single JVM?

You can always prototype the system in Jacl and move to Tcl Blend
when the thread work is finished. Jacl does threads a lot better
than Tcl Blend, at least for now. You should not have to rewrite
anything, both Jacl and Tcl Blend support the same Tcl/Java API.

Mo DeJong
Red Hat Inc


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