[ tcl-Bugs-2093947 ] coroutine+unset trace misfeature

View: New views
1 Messages — Rating Filter:   Alert me  

[ tcl-Bugs-2093947 ] coroutine+unset trace misfeature

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bugs item #2093947, was opened at 2008-09-04 23:48
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2093947&group_id=10894

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: development: 8.6a3
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Donal K. Fellows (dkf)
Assigned to: miguel sofer (msofer)
Summary: coroutine+unset trace misfeature

Initial Comment:
I've been experimenting with traces and coroutines as part of the discussion on http://wiki.tcl.tk/21537 (as to why Lars's proposal isn't good enough) and I came across this:

$ make shell
% proc foo {} {set v 1; trace add variable v {write unset} bar; yield; set v 2; yield; set v 3}
% proc bar args {puts $args};namespace path tcl::unsupported;coroutine a foo
% a
v {} write
% a
v {} write
v {} unset
3
% a
ambiguous command name "a": after append apply array atProcExit auto_execok auto_import auto_load auto_load_index auto_qualify
% coroutine a foo
% a
v {} write
% rename a {}
% a
ambiguous command name "a": after append apply array atProcExit auto_execok auto_import auto_load auto_load_index auto_qualify

It would be *very* nice if variable unset traces were run when a coroutine is "deleted early" since that would mean that the assumption that unset traces could be used to handle scoping of resource lifetime to procedure body execution lifetime was guaranteed. And in a strong sense, the variables are unset when the created coroutine is deleted.

There's probably also a related issue with tailcall not calling unset traces on local variables, but I've not checked. ;-)

I'm sorry these things make stuff messier. Resolving them would, I think, go a long way towards making the NRE stuff fit to come out of the tcl::unsupported closet.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2093947&group_id=10894

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tcl-Bugs mailing list
Tcl-Bugs@...
https://lists.sourceforge.net/lists/listinfo/tcl-bugs
LightInTheBox - Buy quality products at wholesale price!