You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Tom Krehbiel <to...@freescale.com> on 2004/06/01 19:28:24 UTC

Re: Rivet's global

This may be a bit tangent to the discussion but I like the way the tcl test 
command deals with setting up and destroying execution environments. 
Perhaps there is something to be learned from the test command.
Tom K.

> "Damon Courtney" <da...@tclhome.com> writes:
> 
> 
>>>I think it's fine the way it is.  I've gotten burned by it a
>>>couple of times, but once you figure it out, it's fine.  I would
>>>rather address this with better documentation than a change in how
>>>it works.
> 
> 
>>    I've managed to work around it, but I'm trying to think of
>>people who aren't very familiar with it all.  Maybe we need to work
>>in a new command for those people.  It kinda' sucks to add another
>>command just for our stuff, but it wouldn't be the first time. 0-]
> 
> 
> I want it to be 'like regular Tcl' for them.  That was my original
> intention.
> 
> 
>>    I already have some code in my server that does this.  I check
>>file channels and Itcl objects on initialization and then compare on
>>cleanup and destroy anything that's left over.  We could make each
>>piece of this optional.  IE:
> 
> 
>>RivetServerConf Cleanup channels objects variables namespaces all
> 
> 
> I like it!
> 
> 
>>    Obviously, Cleanup all would just cleanup everything, making for
>>a clean interpreter upon the next page load.  This, of course, will
>>be the norm once we implement the ability to use a separate
>>interpreter for each page request (alla NeoWebScript).
> 
> 
> I had that a long time ago, in a galaxy far, far away.  I think it's
> good to have as an option, but it's a bad default because it's 1)
> slow, and 2) you can't share resources.
> 
> 
>>    As I mentioned above, there's also the possibility of adding a
>>new command.  Something like:
> 
> 
>>local foo
> 
> 
>>set foo 1
> 
> 
>>    The 'local' command could be a global variable but in the
>>request namespace.  These are guaranteed to get wiped out when the
>>request is cleaned up.  Anything 'global' could be truly global and
>>would be kept around between page loads.  Same goes for 'variable's.
>>Unless they are in the ::request namespace.
> 
> 
> Mmmmmmmm -0 from me...
> 
> 
>>    *shrug* I just want something that I can rely on to get wiped
>>out when the page is done.  I'd love some way to create local
>>objects as well.  Currently, they can get created in whatever
>>namespace, and unless you destroy them, they hang around.  This
>>could still be remedied by the Cleanup directive though.
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Rivet's global

Posted by "David N. Welton" <da...@dedasys.com>.
Tom Krehbiel <to...@freescale.com> writes:

> This may be a bit tangent to the discussion but I like the way the
> tcl test command deals with setting up and destroying execution
> environments. Perhaps there is something to be learned from the test
> command.

Indeed, you are correct, tcltest has exactly the sort of introspection
code that we could use for Rivet.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org