Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9e671dd620fc8fa8c553e5fed6e285de4d2756f6
Ticket: e8efa378a96bca5e69e00e5feff1315c932ed47b
Duplicate std* channels in different Threads
User & Date: JKU on 2013-08-29 12:47:38
Changes

  1. comment changed to:
    When I create/open a channel in an other Thread (created with <code>thread::create</code>) the names of the first 3 opened channels are <code>stdin</code>, <code>stdout</code> and <code>stderr</code>, as described on the [http://www.tcl.tk/man/tcl8.6/TclLib/StdChannels.htm|Tcl_StandardChannels manual page].
    
    <verbatim>
    % file channels
    stdout stderr stdin
    % package require Thread
    2.6.7
    % set tid [thread::create]
    tid000006C0
    % thread::send $tid {package require tcl::chan::string}
    1.0.1
    % thread::send $tid {::tcl::chan::string "Hello World\n"}
    stdin
    % thread::send $tid {open test.txt w}
    stdout
    % thread::send $tid {file channels}
    stdin stdout
    </verbatim>
    
    This will probably cause problems when transfering the channels.
    
    This behavior was not reproducable with tclsh, only wish seems to be affected.
    
  2. login: "JKU"
  3. mimetype: "text/plain"