would
ns_eval [ns_markfordelete]
work? ns_eval runs a bit of tcl code in each thread.
Personally, I don't use packages/package require, I have an init script
that loads everything. Additionally, all my pieces of code are broken
up into modules. So I can say something like "module_load /module1" and
it'll run the init for that module, updating all the existing threads.
If I say "module_load /" then it'll load all the modules (they are
hierarchically organized)
P.S. the first and only time I've used packages in aolserver was a port
of Listmanager, which you're obviously familiar with. When I want to
reload stuff I actually do a ns_eval myinit where myinit just reloads
everything in custom and htdocs/libtml. It's crude but it works for my
purposes.
Rusty
John Buckman wrote:
Can someone suggest an easy way to tell aolserver to reload its tcl
interps at the next opportunity?
What I basically need is a way to run ns_markfordelete for every tcl
interpreter nsd has open.
http://panoptic.com/wiki/aolserver/Ns_markfordelete
When I push out a new version of BookMooch (via cvs) to the live
server, I currently restart nsd on the production server. What I'd
like to do instead, is to have all my interps exit at their next
opportunity, so that they use the new tcl libraries that are loaded
with "package require".
I can think of a few ways to do it, but they're all somewhat
complicated, so I was wondering if anyone had an easy way to do it?
ie, I could use "nsv_set exit_interp_now 1" that each interp would
check at the end of each page render, but with many tcl interps in
separate threads, it's tricky to make sure each interp exits exactly
one time (ie, how to tell whether an interp that has exited once to
not exit again when it reloads).
-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.