Overview
| Artifact ID: | 80b04221cc412a712608ccdc62efbfcc9a2ba6e7 |
|---|---|
| Ticket: | 2407783fffffffffffffffffffffffffffffffff
Seek causes IO channel to be shared between all interps |
| User & Date: | andreas_kupries on 2008-12-11 00:09:44 |
Changes
- icomment:
@dgp: A bit of clarification. The functions of tclChannelType do indeed Tcl_Preserve/Release ChannelState pointers. This is however not because of my fix. They did that even before I put my hands into this particular pie. As such it is an integral part of this TclObjTyp I was not really willing to change for my fix. What I did was to extend this scheme to the Interp pointer I added to the intrep. It might actually not be necessary, as the Interp pointer is only copied and compared, never de-referenced, contrary to the ChannelState. I should further note that ChannelState structures actually have a refCount. This however is used to count how many interpreters have the the channel Tcl_RegisterChannel()'ed in them, and a refCount > 0 prevents fully closing the channel. I do not believe that it is a good idea to use this refCount to count how many Tcl_Obj refer to this channel. As it means that a 'close $f' will never really close the channel, but only at some arbitrary time later when the last intrep goes away. Which actually may be never during the lifetime of an interp. I will see that I can get a test done for 8.5 and 8.6 in the next days, and then check if may Preseve/Release of the Interp* was overkill. Likely yes. If so I will remove that part of the patch.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"