Tcl package Thread source code

View Ticket
Login
Ticket UUID: 4b9dc05e4ecc9fda484386a41e58fa480490b6e1
Title: documentaion of thread::send command
Type: Patch Version: 8.6.9
Submitter: anonymous Created on: 2019-06-20 20:57:34
Subsystem: 80. Thread Package Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2019-06-21 09:52:45
Resolution: None Closed By: nobody
    Closed on:
Description:
In https://www.tcl.tk/man/tcl8.6/ThreadCmd/thread.htm,
there seems to be a small formatting glitch in the example provided for thread::send command.

In my browser it's rendered like this :

set t1 [thread::create]
    set t2 [thread::create]
    thread::send -async $t1 "set a 1" result
    thread::send -async $t2 "set b 2" result
    for {set i 0} {$i < 2} {incr i} {
        vwait result
    }

I suppose the indentation below the first line isn't intended
(and may produce a false reasoning if the lack of "{" isn't noticed at the end of the first line (for bad eyes...)

Patch :

set t1 [thread::create]
set t2 [thread::create]
thread::send -async $t1 "set a 1" result
thread::send -async $t2 "set b 2" result
for {set i 0} {$i < 2} {incr i} {
     vwait result
    }


Thank you