1
我想移动一些报告处理的一个不同的TCL线程除了主线程,因为当一个报告是非常长的它阻止主应用程序,我有一些C函数,我需要从这个新的线程调用,返回一个需要它的变量。这就是我想要多线程调用函数定义在C从TCL线程
Tcl的代码做截至目前:
proc pdfthread {} \
{
set threadID [thread::create]
set result "" //"getAlarmList" is the C function the rest is the parameters
thread::send $threadID [list getAlarmList 304 {2013-10-16 15:10:26} {2013-10-16 15:13:00}] result
.sumRepTxt insert end "Count = $result\n" //.sumRepTxt is just a text widget
}
截至目前,我得到无效的命令名称“getAlarmList”
你的答案是正确的,但请不要编辑你的答案进入问题。发布它作为答案。注意:你可以尝试'加载{} sample'(没有文件名)。 –
会做,谢谢 –