I need to write some code for a particular problem, but I am not sure how the threading model in OpenACS/AOLServer works. The way I envision it working is this: there is a "global global" and a "local global" of scope.
"Global global" is procs and variables defined in startups like the tcl directory -inits and -procs. These are global across ALL threads, meaning when a web page is loaded and the corresponding script is run (I presume this must be in its own thread), that script has access to stuff defined in -inits and -procs which were already sourced at boot, and it doesn't have to re-source anything.
Each thread also gets it's own global (a "local global") where it can declare global variables and procs available globally to that thread, but aren't available to other threads. This would correspond to a normal global scope in a single-threaded environment.
My basis for assuming it works this way is the fact that there are these -procs and -inits that make things available to all threads, so I assume that has to be the "global global." But while I haven't tested this, it seems there must be a "local global" as well, otherwise one user's script could interfere with another user's script if both pages were hit at the same time.
At any rate, I can proceed after knowing which way it works.