[mod_python] Re: mod_python, the ITK MPM and sessions

Sam Morris sam at robots.org.uk
Wed Nov 8 06:11:18 EST 2006


On Tue, 07 Nov 2006 18:46:44 -0500, Graham Dumpleton wrote:
> Looking at:
> 
>   http://apr.apache.org/docs/apr/apr__global__mutex_8h-source.html
> 
> you might consider changing mod_python code such that instead of
> passing APR_LOCK_DEFAULT to the call of apr_global_mutex_create() in
> src/mod_python.c, change it some some other specific locking
> mechanism rather than relying on APR to choose one for you.

Thanks very much for the pointers! My results:

APR_LOCK_FCNTL: works!
APR_LOCK_FLOCK: works!
APR_LOCK_SYSVSEM: fail (permission denied when acquiring semaphore)
APR_LOCK_POSIXSEM: fail (not implemented on my platform)
APR_LOCK_PROC_PTHREAD: works!

(On my platform, Debian GNU/Linux, APR_LOCK_DEFAULT causes SysV Semaphores
to be used).

Out of these, I guess pthread semaphores are the fastest.

Would you consider adding an option to mod_python's Apache configuration to
control which semaphore implementation is chosen? I can try to come up
with a patch for this.

-- 
Sam Morris
http://robots.org.uk/

PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078



More information about the Mod_python mailing list