From: John R. <joh...@gm...> - 2005-05-16 22:43:48
|
I guess I should have said "webserver" instead of blarg blarg, but you know what I meant. Anyway, I'm running the spyce webserver in forking mode on Linux because if you try to run it in threading mode and you're using certain (almost any) libraries with native components, there's this thing where the python process inevitably crashes because of global interpreter lock mine fields or something. I have certain data structures that I store pickled in files, which I'd like to read in once when the server starts up and not have to parse again. I was hoping I could use the pool for this, but it seems like it's probably impossible for obvious reasons. Is it impossible? Another possibility occured to me as I was typing... the spyce conf file in 2.0 is a python script itself, right? Is it imported in the mother process, before the forking begins? If so, I could just unpickle in the conf script. |