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
|