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.

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?


----------------------------------------------------------------
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

Reply via email to