[Date Prev][Date Next]
Threaded programming with the OpenLDAP 2.0 client libraries
I'm trying to figure out exactly how libldap and libldap_r are supposed to
be used. I recall seeing something (I thought it was in the FAQ but it's
not there now) that said that the straight libldap libraries are safe to
use in a multi-threaded program as long as the LDAP *ctx was either not
shared between threads or was mutex protected.
Looking at the libldap_r code it appears that it's got some locking
constructs which may make it safe to share between threads, but I remember
even then it wasn't fully thread safe.
So when is it safe to use just libldap and when is it safe (and I guess
more importantly _not_ safe) to use libldap_r.
TIA - Rand