Overview
| Artifact ID: | f3027119789973f5c85d3d76d9d167992991f1e2 |
|---|---|
| Ticket: | 2093947fffffffffffffffffffffffffffffffff
coroutine+unset trace misfeature |
| User & Date: | dkf on 2008-09-04 22:48:00 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
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. - foundin changed to: "obsolete: 8.6a3"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dkf"
- subsystem changed to: "None"
- title changed to: "coroutine+unset trace misfeature"
- type changed to: "Bug"