|
From: Joe L. <jl...@op...> - 2002-06-28 16:39:25
|
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=F6der wrote: > Jens Vagelpohl wrote: >> On Wednesday, June 26, 2002, at 04:58 , Michael Str=F6der 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. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Caffeinated soap. No kidding. > http://thinkgeek.com/sf > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev |