Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8a2829e9d704195089a8df56058fab7430fb7efa
Ticket: 577014ffffffffffffffffffffffffffffffffff
documentation; wait on thread exits
User & Date: elfring on 2002-08-06 20:33:03
Changes

  1. icomment:
    Logged In: YES 
    user_id=572001
    
    1. Why does this work only with "Tcl8.4+" and not with earlier TCL 
    versions?
    
    2. I need additional information to understand your code 
    example because I have not found it in the documentation. The key part is the 
    option "joinable". 
    2.1 What does happen if a thread exits before the 
    function "join" is called? I assume that the thread object and its 
    corresponding identifier are destroyed automatically.
    2.2 Or does it 
    work like this?
    The thread's execution is stopped or has reached its end. 
    But this is not the same as an exit which terminates the object. - The "$tid" is still 
    valid because the finished thread remains stored in a list and the function call 
    "join" removes just a list element.
    
    3.1 A thread that called 
    "thread::wait" is waiting for incoming TCL scripts. Is this waiting stopped if a 
    script should be executed by the function call "thread::send"? Should the 
    target thread repeat the "thread::wait" call?
    3.2 I suggest a function that 
    can be offered in the package to wait for more well known situations. Your 
    example can be one "application" for this. How do you think about a (little) 
    function that would combine thread creations and the wait for their 
    exit?
    What other "well known situations" do you know?
    
    4. PLease 
    clarify the relation between the functions "thread::create" and 
    "thread::preserve". What is the reference counter's value for a new thread? 
    Can a new thread be "preserved" automatically?
    
    5.1 How do you 
    work with "global" variables (for example: TCL globals or variables that are 
    global inside a namespace) in the thread package? Do they belong to the first 
    thread?
    5.2 Does an initial set of shared variables exist? What is the result 
    of a function call "[tsv::names]" after process start?
    
    
  2. login: "elfring"
  3. mimetype: "text/plain"
  4. username: "elfring"