Simple threaded web-server based on BaseHTTPServer?

Michael Ströder michael at stroeder.com
Thu Mar 28 14:22:53 EST 2002


Aahz Maruch wrote:
> In article <3C5976D0.A3A63A46 at stroeder.com>,
> Michael =?iso-8859-1?Q?Str=F6der?=  <michael at stroeder.com> wrote:
> 
>>In my case (http://web2ldap.de) I'm using threaded BaseHTTPServer
>>but I'm not really happy with it. Especially since I have to use a
>>module-wide lock to serialize calls into python-ldap module because
>>the underlying OpenLDAP libs are not thread-safe. This can block the
>>whole thing and killing threads on e.g. Linux is not possible.
>>Having a single-process asyncore design would probably make things
>>easier.
> 
> Add another thread to serialize things instead of using a module-wide
> lock.

I really wonder how this helps if the call into the underlying module really 
blocks. BTW: In opposite to my original statement an asyncore design would 
also not help since the underlying OpenLDAP lib is not designed that way.

Ciao, Michael.




More information about the Python-list mailing list