Skip to content
Tcl Source Code History Of Ticket 218414ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 218414ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 218414ffffffffffffffffffffffffffffffffff

  1. Ticket change [2ca0eeaa15] (rid 118936) by nobody on 2000-10-26 00:57:17:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 5492 RFE
      Version: 8.2.1
      SubmitDate: '2000-05-15'
      LastModified: '2000-05-15'
      Severity: LOW
      Status: Closed
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Solaris
      OSVersion: 2.6
      Machine: sun4u
      FixedDate: '2000-10-25'
      ClosedDate: '2000-05-15'
      
      
      Name:
      Benjamin Vitale
      
      DesiredBehavior:
      In Tcl_VwaitObcCmd, you call Tcl_TraceVar with the TCL_GLOBAL_ONLY flag.  I just ran up against the 
      same problem as in bug id #3329 (I tried to append my experience to that bug, but the bugdb sent me here.)
      It took me 5 minutes to figure out what the problem was.
      
      Anyway, I guess this was a bit counter-intuitive.  I can see Jeff's point about not wanting to trace a local var, although I write code
      all the time to do timeouts in non-event driven apps that would exploit even local vars, if I could.  In general, I think we should
      facilitate tools that limit global vars.  At least, it would be nice to allow vwait on namespace vars, if not locals.  Instead, I have to do
      vwait name::space::var
      
      For example,
      
      proc timed_connect {host port timeout} {
        global sem ;# would be nice if I could avoid this.  at least with a namespace, or just use as a local
      
        set s [socket -async $host $port]
        after $timeout {set sem timeout}
        fileevent $s writable {set sem ready}
        vwait sem
        etc.
      }
      
      Thanks for updating vwait.n man page.
      
      BTW, in the 8.2.1 man page namespace.n, you write "See the section SCOPED VALUES..." but I can not find this section.
      
      
      
      It's perfectly correct to use namespace'd vars instead of global ones:
      
      (tkcon) 50 % namespace eval ::foo { variable bar 1 }
      (tkcon) 51 % after 10000 set ::foo::bar 20
      after#3
      (tkcon) 52 % vwait ::foo::bar ; puts hello
      hello
      
      but the var must just be globally scoped ( it would be dangerous
      to say just 'bar', always use the '::foo::bar' construct instead,
      or combine with [namespace current]). 
      -- 05/15/2000 hobbs
      But the user points our that simple, defined local vwaits would be
      useful.  The problem is that you couldn't actually effect the above
      after, or set the sem that way - after always occurs at the global
      scope as well.  Since you can't reenter into that same ephemeral
      proc scope, you can't use vwait in this way. 
      -- 05/15/2000 hobbs
      
    4. foundin initialized to: "obsolete: 8.2.1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "07. Variables"
    10. title initialized to: "vwait should allow local scope"
    11. type initialized to: "Bug"
  2. Ticket change [0f4153a018] (rid 94755) by welch on 2000-10-26 08:21:18:

    1. closedate changed to: "2000-10-26T01:21:18"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"