|
|
 |
tcl-threads
[Tcl-Threads] Ttrace
by Kim Chuan Lim other posts by this author
Jun 10 2005 6:50AM messages near this date
Re: [Tcl-Threads] Ttrace
|
[Tcl-Threads] Embeded tcl interpreters in multithread C++ application
can i have some examples of how to use ttrace?
the example from this webste: http://wiki.tcl.tk/2770
is not working. I can call either the proc foo or bar in the thread.
################# Error msg ############################
Error in startup script: invalid command name "bar"
while executing
"bar"
("for" body line 3)
invoked from within
"for {set i 0} {$i < 4} {incr i} {
set tid($i) [thread::create -preserved]
bar
}"
(file "wiki.tcl" line 4)
####################################################
code:
~~~~
package require Thread
package require Ttrace
for {set i 0} {$i < 4} {incr i} {
set tid($i) [thread::create -preserved]
bar
}
ttrace::eval {
proc foo {} {
puts foo
}
proc bar {} {
puts bar
}
}
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
Tcl-Threads mailing list
Tcl-Threads@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-threads
|
|
|
 |
|