Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9420339796ceb7954aab72d81033e1dd5d3d4ced
Ticket: 3427545fffffffffffffffffffffffffffffffff
Tcl_CreateInterp() hangs
User & Date: realmojo on 2011-10-23 14:09:30
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Dear all, 
    
       I try to integrate tcl interpreter into my C++ program, but when I 
    call Tcl_CreateInterp() 3rd times in a new thread, it hangs.  This 
    problem only occurs in tcl85.dll.  when I change to tcl83.dll, this 
    problem disappeared.  Here is my code.  Thank you for help 
    
    
    #include <afxwin.h> 
    #include "tcl.h" 
    #include <iostream> 
    #include <process.h> 
    
    
    using namespace std; 
    
    
    DWORD WINAPI TclThread(LPVOID) 
    { 
        Tcl_Interp *interp = Tcl_CreateInterp(); 
        cout << " exit TclThread " << endl; 
            return 0; 
    } 
    
    int main(int argc, char *argv[]) 
    { 
      for (int i = 0; i < 3; i++) 
      { 
          unsigned long p; 
          CreateThread(NULL, 0, TclThread, NULL, 0, &p); 
          Sleep(2000); 
      } 
    
      system("pause"); 
    }
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "realmojo"
  10. subsystem changed to: "None"
  11. title changed to: "Tcl_CreateInterp() hangs"
  12. type changed to: "Bug"