Pierangelo Masarati wrote:
I see there are quite a few calls to ldap_pvt_thread_yield() in slapd's
code; one is in syncprov.c, two in connection.c, five in daemon.c and a
bit in back-{ldap,meta}/bind.c; just one in back-{ldap,meta}/search.c.
The ones I know about (because I worked a those pieces of code; talking
about the proxy backends) are there essentially as a workaround to force
scheduling of a waiting thread when releasing and reaquiring a mutex.
Should they be removed as well?
No, not all of them can be simply removed. A lot of the
release/reacquire stuff should be written with condition variables
instead, to guarantee that some other thread will take over. Some of
them I'm inclined to leave alone for the moment, because they're
uncommon cases, and generally will not be executed.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/