defect

Joe Little jlittle at open-it.org
Fri Jun 28 18:39:11 CEST 2002


Michael.

We beat this one up a bit before... But I asked Luke Howard (who is generally in the know on this stuff) again about OpenLDAP thread-safety, and he said that it is thread safe. Perhaps Leif can chime in here on where it stands.



On Thursday, June 27, 2002, at 10:47 AM, Michael Ströder wrote:

> Jens Vagelpohl wrote:
>> On Wednesday, June 26, 2002, at 04:58 , Michael Ströder wrote:
>>> It's possible to make it somewhat simpler since we have a first result() call before the while loops.
>>>
>>>     while all:
>> this simplified version seems to slow down my setup.
>
> Yes. I wrote that when posting the code snippet.
>
>> here's a result set with leif's version::
>
> Leif's version sets non-zero timeout. Therefore it's faster since OpenLDAP's ldap_result() can use select() to determine just-in-time when data is ready to be read. But it blocks which is a bad thing because of ldap._ldap_lock serializing *all* calls...
>
> Just adding the time.sleep() hands over the CPU to the OS. Off course the while-loop is not just-in-time there if received data is ready.
>
> Again, the problem is that the OpenLDAP libs are not thread-safe...
>
> Ciao, Michael.
>
>
>
> 


More information about the python-ldap mailing list