On Tue Nov 07 15:32:38 2006, ptc wrote: > The file languages/tcl/src/builtin/close.pir is only a stub > implementation; it needs implementing properly. > > This ticket is in response to cage task #39704.
A first implementation of [close] was committed in revision 16933. There's a little issue with the channels id naming that will require further discussion. In Tcl the channel ids are reused, which means when you close a channel the corresponding id will be free to create new channel ids. The current implementation of 'languages/tcl' uses a global Integer to keep track of the created channels ids, that is incrementend every time a channel is created. This means that the created channels ids will always be incremented and never reused. Coke very well suggested to use a lazy list of available ids and push the closed ids to the beginning of the list in order to reuse those ids. I guess the issue is how close to be to the actual implementation of Tcl. ./smash