Hi!

Can somebody explain me why are the global modules
loaded as part of the prestart callbacks instead of
directly from within bin/init.tcl ??

ns_runonce -global {
    ns_atprestartup {
        set modules [ns_configsection ns/modules]
        if {$modules ne ""} {
            foreach {module file} [ns_set array $modules] {
                ns_moduleload -global $module $file
            }
        }
    }
}


The question is: why ns_atprestartup ??

I have followed the code-sequence triggered from C-level
but I was unable to understand why, unless there is some
very hidden reason, in which case we ought to document that
in more detail.

From what I could see, everything works fine even without
postponed loading, i.e. w/o ns_atprestartup.

Cheers
Zoran

Reply via email to