код
#! /usr/bin/tclsh
package require Thread
set bbb {11 22 33 44}
foreach tsv::set array ccc $bbb {
set id [thread::create -joinable {
puts [tsv::get array ccc]
}]
lappend ti $id
}
foreach id $ti {
thread::join $id
}
Выхлоп
./threads.tcl
Error from thread tid0x7f3c860eb700
no key array(ccc)
while executing
"tsv::get array ccc"
invoked from within
"puts [tsv::get array ccc]"
Error from thread tid0x7f3c858ea700
no key array(ccc)
while executing
"tsv::get array ccc"
invoked from within
"puts [tsv::get array ccc]"
Error from thread tid0x7f3c84ed2700
no key array(ccc)
while executing
"tsv::get array ccc"
invoked from within
"puts [tsv::get array ccc]"
Error from thread tid0x7f3c846d1700
no key array(ccc)
while executing
"tsv::get array ccc"
invoked from within
"puts [tsv::get array ccc]"
Где накосячил?