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-core
tcl-core
[TCLCORE] Slave interpreters, events and atomicity of callbacks
by K2k2e6 other posts by this author
Oct 23 2009 12:22PM messages near this date
[TCLCORE] Tcl/Tk 8.5.8 Release Candidates | Re: [TCLCORE] Slave interpreters, events and atomicity of callbacks
Guys

I have a question about timer events and their atomicity in slave
interpreters.

Assume that I do the following:
interp create slave
slave eval after 1000 proc_foo   # proc foo does some work and repeats the
after 1000 proc_foo at the end to repeat

slave eval set  i 0
slave eval puts $i
slave eval set  i 0
slave eval puts $i
...

My question is, when the proc_foo is called, does it execute to completion
before any of my subsequent statements get executed or my subsequent
statements are interleaved with the statements of proc_foo?

We are seeing a problem with interleaving because one can set the variable
in the context of proc_foo and then try to get the variable "i" outside the
context and one gets "variable not found error".

So in slave interpreters, are timer callbacks executed "atomically"?

We are seeing that it is not using ActiveState Tcl 8.4.19.2 threaded
distribution. The documentation does not clearly state what will happen in
this case.
-- 
View this message in context: http://www.nabble.com/Slave-interpreters%2C-events-and-atomici
ty-of-callbacks-tp26031628p26031628.html
Sent from the tcl-core mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
K2k2e6
Mark Janssen
K2k2e6
Alexandre Ferrieux

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved