Forum OpenACS Development: Re: blueprint and *-init.tcl files

Posted by Andrew Piskorski on
Gustaf, AFAIK that behavior is neither intended nor desirable, it's a bug. (I think all the APM code pre-dates AOLserver 4.x, which might have something to do with the problem.)

Btw, in AOLserver 4.0.10 but without OpenACS, I do spawn detached threads from tcl/*.tcl files during AOLserver startup, and those detached threads do have all my custom Tcl procs defined. So whatever is going on with your problem, it sounds like it's probably specific to OpenACS.

A related problem is the "reload changed files" feature from the OpenACS APM. It can re-load changed Tcl procs, but it does so only in AOLserver connection threads - other threads, like the scheduler thread, see new procs only if you restart AOLserver. That's probably fixable by simply changing that feature to use ns_eval instead of its current and ancient method of hooking into the OpenACS request processor. That's been discussed before but AFAIK no one has actually tried it.