From: Vasiljevic Z. <zv...@ar...> - 2008-05-10 16:08:43
|
On 10.05.2008, at 17:50, Vasiljevic Zoran wrote: > I think > it is the most one can do with Tcl. Hm ... not that bad consider the trivialiy of the example. package req Thread set tp [tpool::create -initcmd { proc sayhello args { return hello-[thread::id] } }] proc unknown args { global tp set id [tpool::post $tp $args] tpool::wait $tp $id tpool::get $tp $id } % time {sayhello} 100 48 microseconds per iteration % sayhello hello-tid0xb0103000 % thread::id tid0xa0111fa0 As you see, unknown triggers the sayhello that is declared on pool threads, but not in my thread. And the execution time is not really bad. And this is just generic stuff. Done in C really tight, I can go make that 1/5 most probably. |