On Thu, 12 Oct 2000, Daniel Wickstrom wrote:

> >>>>> "Mo" == Mo DeJong <[EMAIL PROTECTED]> writes:
> 
> 
> 
>     Mo> What do you mean by "The jvm attach is done at the start of
>     Mo> the thread by a registered proc"? Are you not using:
> 
>     Mo> (*javaVM)->AttachCurrentThread()
> 
>     Mo> In JavaInitEnv() to attach the Tcl thread to the JVM?  This is
>     Mo> also the place where this is called.
> 
>     Mo> Tcl_CreateThreadExitHandler(TclThreadCleanup, NULL);
> 
> 
>     Mo> Perhaps I am just not understanding what you mean. You really
>     Mo> should not need to do your own JVM attach, at least that is
>     Mo> not something I had considered (ugh, we don't really need
>     Mo> another init case).
> 
> I should have elaborated.  To use tclblend in aolserver, I basically
> had to tear apart javaCmd.c and re-implement it in the structure required
> by aolserver.  aolserver provides functions outside of tcl to register
> a function at the start of a thread.  I'm using this aolserver
> registered function to call AttachCurrentThread.  I'm also calling
> Tcl_CreateThreadExitHandler(TclThreadCleanup, NULL) in my init
> routine.  Other than javaCmd.c, the rest of the tclblend code is the
> same as what I pulled out of cvs.  At some later time, when I
> understand everything, I'm going to try and restructure everything to
> use the code in javaCmd.c if possible.  If not, I will have one extra
> 'c' file to support aolserver.

If you ask me, you time would be better spent getting the
current code into "shape" so that it can be dropped into
aolserver as is.

The code on the branch is not really set in stone, so if
you can provide a reasonable way to add your stuff with
only a minimal change (like #ifdef AOLSERVER perhaps),
then we could add it in without lots of duplicated
functionality. Of course, it is up to you, but in the
long run 1 codebase is far far better.

One thing that we really should do is document the
init cases, we currently have three of four ways
a thread can go through the init code. It would
be nice to write each one down.

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

Reply via email to