On 17 June 2002, holger krekel said:
> But i wonder how i could share state between different requests. As i
> understand it, the scgi-handler spawns new processes if the current
> processes are busy handling previous requests. But two processes can't
> easily share state anymore (Threads could).
See doc/session-mgmt.txt .
> So how am I to share state within the application no matter how many
> requests arrive? Modify the scgi-handler to use threads? Would that
> be possible (any thread safety-issues involved?)
Quixote is not currently thread-safe.
> And no, i don't like to save my state to disk so that other processes
> (serving different requests) could load it. It's mainly about caching
> computations or complex (nonsql-) queries.
Oh. Well, you'll have to roll your own then. Doing this without
writing anything to disk sounds hellish -- I wish you good luck. When
you decide that was a mistake, go back to doc/session-mgmt.txt. ;-)
Greg
--
Greg Ward - software developer gward@mems-exchange.org
MEMS Exchange http://www.mems-exchange.org