On Mon, 17 Jul 2000, Christian Krone wrote:

> So here are some minor patches to Channel related
> classes: Corrected error messages and a move of the
> actual closing of the channel from CloseCmd.cmdProc()
> into TclIO.unregisterChannel().

I am going to check in all of your patches. The only
thing I saw that seemed to be wrong was the refCount
test when closing the channel. I think the channel
should get closed when the refCount goes from 1 to 0.
You patch would only close the channel when the
count moved from 0 to -1, which seems wrong to me.
If I was incorrect about this, please feel free to
correct me. Here is the bit I am going to check in.

     static void unregisterChannel(Interp interp, Channel chan) {
         
-        Hashtable chanTable = getInterpChanTable(interp);
+       Hashtable chanTable = getInterpChanTable(interp);
        chanTable.remove(chan.getChanName());
+
+       if (--chan.refCount <= 0) {


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