[mod_python] Re: Another threading issue: chdir (fwd)

Gregory Trubetskoy grisha at modpython.org
Mon Jun 12 17:48:08 EST 2000


On Mon, 12 Jun 2000, Greg Stein wrote:

> On Mon, Jun 12, 2000 at 11:06:03PM +0200, Stéphane Bidoul wrote:
> > >The more I think about this, the more it seems to me that doing away with
> > >the chdir and prepending the path rather than the '.' is the way to go.
> > 
> > Agreed, but I wonder how much the manipulation of sys.path to do the imports
> > can cause threading issues... Is it possible to avoid it?
> 
> sys.path is specific to an interpreter, rather than to a thread. Therefore,
> threads should not be changing it.

On a related note though - is ap_table_set() thread-safe? I'm thinking of
all the Python* directives in .htaccess.

> as an Apache author, I can also make changes to Apache to enhance
> this even further :-)

Now that's luxury!

Grisha




More information about the Mod_python mailing list