Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 77fa662c8f06a027f193e3becf802182df154fa4
Ticket: 1505810fffffffffffffffffffffffffffffffff
init.tcl not found in thread interpreter
User & Date: cnassau on 2006-06-14 06:39:31
Changes

  1. assignee changed to: "vasiljevic"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    We are using the thread extension in combination with
    an application specific tcl_library path (in other
    words, in this installation *only* the tcl_library
    variable knows where to find a usable "init.tcl"). With
    thread-2.6.3, when we spawn a new thread using
    "thread::create" that new thread does not find the
    "init.tcl" and is thus slightly handicapped; we
    currently have to manually do the following to get a
    functional thread:
    
    thread::send $tid [list set tcl_library $tcl_library]
    thread::send $tid {
       source [file join $tcl_library init.tcl]
    } 
    
    This feels like a hack that better ought to be fixed in
    the thread package itself. 
    
    Inspecting the code one finds that threadCmd.c executes
    
        interp = Tcl_CreateInterp();
        result = Tcl_Init(interp);
    
    in NewThread(clientData). It seems that "result" is
    currently not used, so any failure at that stage
    remains unnoticed. I would suggest to always initialize
    the thread's tcl_library with the parent's tcl_library
    before calling Tcl_Init().
    
    
    
  4. foundin changed to: "obsolete: 8.4.13"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "cnassau"
  9. subsystem changed to: "80. Thread Package"
  10. title changed to: "init.tcl not found in thread interpreter "
  11. type changed to: "Bug"