[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Thread safety question

At 07:17 AM 2002-01-02, Don Zick wrote:
>Is it safe for one application thread to call ldap_search() and another
>to call ldap_result()?

When using -lldap_r, an application can use each LDAP session
handle in one thread at a time.  Normally, the application
ensures this by restricting operations upon a handle to one
thread, however the application is free to use other means
to serialize calls upon a handle.

Also note that calls which don't take a session handle also
need to be serialized...

slupd(8) is a example threaded application which manages
multiple connections.