Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 210e4037db1796f622a26690e334294cf2a11222
Ticket: 2844962fffffffffffffffffffffffffffffffff
Tcl_UpdateLinkedVar does not trigger tk widget updates
User & Date: kchansen on 2009-09-02 23:19:17
Changes

  1. icomment:
    EUREKA!
    
    <Pauses while epiphany sinks in>
    
    I was *wondering* how one would protect other code from a misbehaving callback.  I think we definitely need to add links from the *Link* descriptions to the *Async* descriptions, with a note that says something to the effect:
    
    "Critical Note: Modifying a linked variable asynchronously from C (e.g. in response to a signal or interrupt) requires additional measures to protect the system.  See Tcl_AsyncCreate() and Tcl_AsyncMark() for details."
    
    I have tagged this as *CLOSED-INVALID*, but definitely want to push for the addition to the documentation.  I have left the status as "OPEN" for comment posting.
    
    I added a call to Tcl_AsyncCreate() to my init function, and my callback now does the calcs against the C variables, then calls Tcl_AsyncMark().  The async handler calls the Tcl_UpdateLinkedVar() for each of the touched variables.  Now the values are updating beautifully!
    
    Thanks again for the quick work on this!
    
    I would have left this open and just changed the category but "other" is too vague, and I don't see a category for "documentation/helpfile"....
    
    
  2. login: "kchansen"
  3. mimetype: "text/plain"
  4. username: "kchansen"