Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 35c905704d72819c309ca8220b53c56e3d2ede25
Ticket: 2826430fffffffffffffffffffffffffffffffff
Channel name recycling is dangerous
User & Date: coldstore on 2009-07-24 07:42:41
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    I would like a [chan rename $oldname $newname] command, which renamed a channel.
    
    This would be useful to avoid bugs (admittedly, caused by other bugs) where an open channel name is stored in one data structure, perhaps in a coro, thread or interp, and the channel is closed before the channel name can be removed from those data structures.  The current effect of such uncoordinated storage is that either a delay in closing the channel must be suffered while all copies of the name are updated, or that a stale chan name is held somewhere, and causes a new chan (usually a socket) with the same name as the old (and now closed) chan to be manipulated in error.
    
    This problem arises, essentially, because tcl reuses chan names frequently, and chooses them from a very compact set.
    
    By enabling arbitrarily named chans, at construction time, chan name conflict could be completely avoided by an application.  As a stopgap, synthetic channels can be constructed with unique names, but this is an extra level of indirection.
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "7 High"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "coldstore"
  10. subsystem changed to: ""
  11. title changed to: "Ability to rename chans"
  12. type changed to: "Bug"