[Tcl Java] Re: global JavaInfo structure in threaded tclblend.

2000-08-28 Thread Daniel Wickstrom

> "Mo" == Mo DeJong <[EMAIL PROTECTED]> writes:

Mo> On Mon, 28 Aug 2000, Daniel Wickstrom wrote:
>> I would anticipate some changes to the autoconf files and
>> makefile templates, and the addition of some aolserver specific
>> 'c' files.

Mo> That does not sound too bad. How about a src/aolserver
Mo> subdirectory for your .c files?

That works for me.

>> I don't expect a firm commitment from you to add support for
>> aolserver integration, but I'm interested to know if you are
>> open to the idea.  Your openness to the idea would affect my
>> approach to integrating tclblend in aolserver.  If however, you
>> don't want the additional complication to the tclblend
>> distribution, I understand.

Mo> Keep in mind that you are going to have to do your own
Mo> testing.  If (more like when) I change something that breaks
Mo> the AOL build, you are going to have to fix it and send in a
Mo> patch.  If you are interested in taking responsibility for the
Mo> AOL parts of the code then I am interested in adding the code.

This also works for me.  I would be glad to take responsiblity for the
aolserver-specific code.


-Dan


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: global JavaInfo structure in threaded tclblend.

2000-08-28 Thread Mo DeJong

On Mon, 28 Aug 2000, Daniel Wickstrom wrote:

> I would anticipate some changes to the autoconf files and makefile
> templates, and the addition of some aolserver specific 'c' files.

That does not sound too bad. How about a src/aolserver subdirectory
for your .c files?

> I don't expect a firm commitment from you to add support for aolserver
> integration, but I'm interested to know if you are open to the idea.
> Your openness to the idea would affect my approach to integrating
> tclblend in aolserver.  If however, you don't want the additional
> complication to the tclblend distribution, I understand.

Keep in mind that you are going to have to do your own testing.
If (more like when) I change something that breaks the AOL
build, you are going to have to fix it and send in a patch.
If you are interested in taking responsibility for the AOL parts
of the code then I am interested in adding the code.

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: global JavaInfo structure in threaded tclblend.

2000-08-28 Thread Daniel Wickstrom

> "Mo" == Mo DeJong <[EMAIL PROTECTED]> writes:

Mo> On Mon, 28 Aug 2000, Daniel Wickstrom wrote:
>> > "Mo" == Mo DeJong <[EMAIL PROTECTED]> writes:
>> 

>> Also, when I get tclblend working in aolserver, would you be
>> interested in incorporating the changes in tclblend as a
>> conditional compile option to support aolserver?  I will try to
>> minimize the changes to tclblend as much as possible.

Mo> What would you need to change? I can't agree to something
Mo> without knowing what it would entail.

I would anticipate some changes to the autoconf files and makefile
templates, and the addition of some aolserver specific 'c' files.

I don't expect a firm commitment from you to add support for aolserver
integration, but I'm interested to know if you are open to the idea.
Your openness to the idea would affect my approach to integrating
tclblend in aolserver.  If however, you don't want the additional
complication to the tclblend distribution, I understand.

-Dan


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: global JavaInfo structure in threaded tclblend.

2000-08-28 Thread Mo DeJong

On Mon, 28 Aug 2000, Daniel Wickstrom wrote:

> > "Mo" == Mo DeJong <[EMAIL PROTECTED]> writes:
> 
> Mo> On Wed, 23 Aug 2000, Daniel Wickstrom wrote:
> >> I'm curious about the JavaInfo structure in javaCmd.c.  When I
> >> looked at this before, I assumed that you would need a seperate
> >> JavaInfo structure per thread.  The code I'm looking at now
> >> seems to assume one global JavaInfo structure that can be used
> >> by all tcl threads.  Am I missing something here, or is this
> >> part of the code still work in progress?  I thought I read
> >> somewhere in the java docs that class and method ids can't be
> >> shared between java threads.
> >> 
> >> -Dan
> 
> Mo> Just a quick update, I moved the cache into thread local
> Mo> storage and reworked a bunch of stuff to support it. Things
> Mo> should be fully thread safe now. If you want to take another
> Mo> peek you are welcome to, of course you might have to wait
> Mo> until monday morning for the CVS mirror to update.
> 
> 
> Ok thanks.  I'll take a look at it tonight.  
> 
> When do you anticipate finishing your work on the ajuba contract
> branch?

There is no clear date.

>  Also, when I get tclblend working in aolserver, would you be
> interested in incorporating the changes in tclblend as a conditional
> compile option to support aolserver?  I will try to minimize the
> changes to tclblend as much as possible.

What would you need to change? I can't agree to something
without knowing what it would entail.

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: global JavaInfo structure in threaded tclblend.

2000-08-28 Thread Daniel Wickstrom

> "Mo" == Mo DeJong <[EMAIL PROTECTED]> writes:

Mo> On Wed, 23 Aug 2000, Daniel Wickstrom wrote:
>> I'm curious about the JavaInfo structure in javaCmd.c.  When I
>> looked at this before, I assumed that you would need a seperate
>> JavaInfo structure per thread.  The code I'm looking at now
>> seems to assume one global JavaInfo structure that can be used
>> by all tcl threads.  Am I missing something here, or is this
>> part of the code still work in progress?  I thought I read
>> somewhere in the java docs that class and method ids can't be
>> shared between java threads.
>> 
>> -Dan

Mo> Just a quick update, I moved the cache into thread local
Mo> storage and reworked a bunch of stuff to support it. Things
Mo> should be fully thread safe now. If you want to take another
Mo> peek you are welcome to, of course you might have to wait
Mo> until monday morning for the CVS mirror to update.


Ok thanks.  I'll take a look at it tonight.  

When do you anticipate finishing your work on the ajuba contract
branch?  Also, when I get tclblend working in aolserver, would you be
interested in incorporating the changes in tclblend as a conditional
compile option to support aolserver?  I will try to minimize the
changes to tclblend as much as possible.

-Dan


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: global JavaInfo structure in threaded tclblend.

2000-08-27 Thread Mo DeJong

On Wed, 23 Aug 2000, Daniel Wickstrom wrote:

> I'm curious about the JavaInfo structure in javaCmd.c.  When I looked
> at this before, I assumed that you would need a seperate JavaInfo
> structure per thread.  The code I'm looking at now seems to assume one
> global JavaInfo structure that can be used by all tcl threads.  Am I
> missing something here, or is this part of the code still work in
> progress?  I thought I read somewhere in the java docs that class and
> method ids can't be shared between java threads.
> 
> -Dan

Just a quick update, I moved the cache into thread local storage
and reworked a bunch of stuff to support it. Things should
be fully thread safe now. If you want to take another
peek you are welcome to, of course you might have to wait
until monday morning for the CVS mirror to update.

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: global JavaInfo structure in threaded tclblend.

2000-08-24 Thread Mo DeJong

On Thu, 24 Aug 2000, Daniel Wickstrom wrote:

> > "Mo" == Mo DeJong <[EMAIL PROTECTED]> writes:
> 
> 
> Mo> So it looks like you are right, we need to put the method
> Mo> cache in thread local storage. The contract branch is clearly
> Mo> not finished, there is a lot of work that still needs to be
> Mo> done.
> 
> Ok thanks for the sanity check.  Could you summarize the changes that
> you are going to make to the ajub contract branch?  Is there anything
> else that needs to be put into thread-local storage?  It seems that
> the notifier code will need to change also.  Is that correct?

1. Make sure everything is thread safe.
   I think it will be ok after putting JavaInfo in thread
   local storage, but more eyes on a problem always help.

2. Use Tcl threaded notifier instead of the current hack.
   I think we just need to add a TclThread filed to the
   tcl.lang.Interp and set it during the Interp init.
   We then use that TclThread pointer to wake up
   the Tcl Notifier in the other thread.

3. Incr and Decr objects in the Tcl way, instead of trying
   to garbage collect dangling pointers.
   This one is going to be painful, but it needs to be
   done. I have a "sort of" working patch, but there is
   a lot left to do (tracking down the missing incr/decr calls).

There is some other stuff, but these are the major pieces.

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: global JavaInfo structure in threaded tclblend.

2000-08-24 Thread Daniel Wickstrom

> "Mo" == Mo DeJong <[EMAIL PROTECTED]> writes:


Mo> So it looks like you are right, we need to put the method
Mo> cache in thread local storage. The contract branch is clearly
Mo> not finished, there is a lot of work that still needs to be
Mo> done.

Ok thanks for the sanity check.  Could you summarize the changes that
you are going to make to the ajub contract branch?  Is there anything
else that needs to be put into thread-local storage?  It seems that
the notifier code will need to change also.  Is that correct?


-Dan


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: global JavaInfo structure in threaded tclblend.

2000-08-23 Thread Mo DeJong

On Wed, 23 Aug 2000, Daniel Wickstrom wrote:

> After moving back to the u.s., I've started looking into integrating
> tclblend into aolserver/nsjava again.  Last night I checked out the cvs
> sources from the cvs ajuba contract branch, and started to compare it
> to version 1.2.6.  

Welcome back. The taxes are high, the crime rates are low,
at almost 5% of the population is in jail. You gotta love the US.

> I'm curious about the JavaInfo structure in javaCmd.c.  When I looked
> at this before, I assumed that you would need a seperate JavaInfo
> structure per thread.  The code I'm looking at now seems to assume one
> global JavaInfo structure that can be used by all tcl threads.  Am I
> missing something here, or is this part of the code still work in
> progress?  I thought I read somewhere in the java docs that class and
> method ids can't be shared between java threads.

I took another look at the docs and found this note:

http://java.sun.com/products/jdk/1.1/docs/guide/jni/spec/functions.doc.html#16027

"Note that the function table can be shared among all JNI interface 
pointers."

So it looks like you are right, we need to put the method cache
in thread local storage. The contract branch is clearly not
finished, there is a lot of work that still needs to be done.

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