Am 06.08.2007 um 19:24 schrieb Stephen Deasey:

> On 8/6/07, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
>>
>> As of today, what we have is:
>>
>> a.
>>     introspective script based on the "old" way as 4.0 AS
>>     did it (init the interp by loading all Tcl files then
>>     run a script to pull-out namespaces, variables etc
>
> "variables etc."  -- do we support variables?

If somebody in any Tcl library file says:

   variable dummy
   set dummy 1

the "dummy" gets initiated with the value 1 every
time somebody creates a new fresh interp.

>
> We have a pretty explicit (and simple) end-user programming model: the
> Tcl code that runs for each connection begins in a known environment,
> which includes all the procs/commands you need, plus a clean slate as
> far as global variables go. Connections are independent.
>
> #
> # ns_cleanupvars --
> #
> #     Destroy global variables. Namespaced variables
> #     are left and could introduce unwanted state.
> #
>
> IIRC namespaced variables aren't touched because it would be too  
> expensive.

That is right (and wrong). Wrong because of the hidden state
introduced by that. But, again, it is too expensive to catch
those things. It might be simpler to ditch the interp and
create it again (with lazyloader=true this would be a snap).

>
> Do they get cloned at startup though?  This test:
>
> test init-1.4 {namespace variables do not get cloned} -body {
>     ns_job wait $qid [ns_job queue $qid { info exists
> testnamespace::testvariable2 }]
> } -result 0
>
> ..fails when lazyloader=false, but passes when lazyloader=true. What's
> going on here?

Eh, no idea but I'm going to find out... Stay tuned.

Cheers
Zoran

>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a  
> browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> naviserver-devel mailing list
> naviserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/naviserver-devel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to