Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b348147f4234a804dd3522b8f3345a09a6b91eb6
Ticket: 849901ffffffffffffffffffffffffffffffffff
Cooperative event threading
User & Date: s_a_white on 2005-01-12 18:00:01
Changes

  1. icomment:
    Logged In: YES 
    user_id=59929
    
    I did try out the threading extensions first in the hope
    they would do what I required.  However unless this is
    nolonger true, you were forced to have things like seperate
    interpreters and such which didn't work.  I need objects,
    global variables, displays to be accessable by both.  It
    would be great if threading was like c where everything had
    access to everything and you just protect as required, this
    would work great.
    
    As for the event cooperative order switching: an example
    situation (and there are many different others and alot more
    complicated) is that the user presses a button to start a
    sequence.  This calls some code, which calls so more code,
    etc, etc so we are now down a number of levels on the stack
    with specific parameters.  Finally we get to a central point
    which which decides to act on it but says hang on I can't
    just yet because that section of code is already running as
    an update had to be executed.
    
    Then as explained we are forced to drop the event or get it
    somehow at the back of the event queue.  Ideally i would
    just tkwait on variable and then when the other code
    finishes it would just resume, however it never does because
    the older event is permenantly blocked by this one doing a
    tkwait.
    
    I'm afraid I am not aware in the changes required, but
    assumed the code supplied its own stack that wouldn't be
    tied to the C stack itself (since tcl operations have
    different lifetimes to the C parsing of the tcl).  The tcl
    pro debugger also shows the stack restarting so there
    appears to be some concept of seperate tcl stacks per event,
    so hoped it maybe just a matter of order switching (in some
    sort of controlled way).
    
    
    
  2. login: "s_a_white"
  3. mimetype: "text/plain"
  4. username: "s_a_white"