Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 38b030db87034eb31f11fc15b447339fda92da00
Ticket: 872298ffffffffffffffffffffffffffffffffff
Locked access to global variables
User & Date: dkf on 2004-01-07 18:51:18
Changes

  1. closedate changed to: "2004-01-07T11:51:18"
  2. closer changed to: "dkf"
  3. icomment:
    Logged In: YES 
    user_id=79902
    
    This FRQ is invalid because Tcl and the thread extension
    already provide all the tools required.  If there is
    anything further needed, it should be prototyped within the
    context of tcllib first.  On your specific points:
    
    1) http://tcl.tk/man/tcl8.4/TclCmd/trace.htm (and there is
    an equivalent mechanism at the C level) allows all Tcl
    variable reads and writes to be trapped and clever things done.
    
    2) Global variables are just global to an interpreter
    (except for the ::env array, which is deeply magical, messy,
    and has proper locking behind the scenes IIRC.) 
    Interpreters are always single-threaded; multi-threaded Tcl
    has multiple interpreters, but each interp is constrained to
    a single thread (this is a fundamental design model thing.)
     Hence a -synchronized option is (mostly) irrelevant as all
    variable accesses are already sufficiently synchronized; the
    shared-variable stuff in the thread package (which I believe
    you already know about) is how you get variables visible
    across multiple interpreters.
    
    
  4. login: "dkf"
  5. mimetype: "text/plain"
  6. resolution changed to: "Invalid"
  7. status changed to: "Closed"
  8. username: "dkf"