The new command is ns_ictl (interp control) Each interp has an epoch and when you grab an interp, this is supposed to be checked, ns_ictl can be used to make sure that things are cleaned up or initialized.
I don't have any examples however, but you can see some of it at work in the use bin/init.tcl script. For instance, this script closes files when a connection closes. Also look at nsd/tclinit.c to see how connection interps are managed. Maybe this is the key issue: not all interps are managed the same way. Can you describe what you are trying to achieve and how you test to see that it isn't working? It would be nice to see some working code/configuration to supplement the documentation. tom jackson On Friday 02 November 2007 08:42, John Buckman wrote: > What do the other aolserver programmers do to ask all the tcl interps > to reload, so that new code can be brought in without restarting the > server? > > I have a technique (described below) but it's not bug-free, so I was > wondering what people recommended? > > One possibility, would be to ask all the tcl interpreters to exit on > the next page request, so that a new thread and thus new tcl > interpreter is created, loading up the new libraries. I don't know > how to do that, though. > > Currently, I have a namespaced global variable $reload::time that is > set to the time when the last "package forget/package require". was > run When I want to reload all interpreters, I set a nsv variable to > the current time, and a function registered as > > ns_register_filter postauth GET /* mooch_reload_check > > runs for every page, so that if the nsv's reload time is not the same > as the local interp's reload time, then I run: > > foreach p [package names] { > package forget $p > } > > This seems to mostly work, but some interpreters don't play nice. > > Other suggestions.... ? > > -john > > > -- > AOLserver - http://www.aolserver.com/ > > To Remove yourself from this list, simply send an email to > <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the > email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.