ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-threads
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved