ietf
[Top] [All Lists]

RE: LDAP Client API in C with Notification of the end of a reques t

2001-05-25 06:50:02
James,
Very interesting statement about strtok().  Do you know which OS or where I
can find the material supporting your point here?
Thanks
-----Original Message-----
From: James P. Salsman [mailto:bovik(_at_)best(_dot_)com]
Sent: Thursday, May 24, 2001 11:17 PM
To: laurent(_dot_)forest(_at_)ca(_dot_)sema(_dot_)com
Cc: ietf(_at_)ietf(_dot_)org
Subject: Re: LDAP Client API in C with Notification of the end of a
request


... The only way to check
if a request is completed is to call the "ldap_result()" function for the
messageId of each outstanding request, in a waiting or polling mode....

If you are compiling in an envionment that supports threads, make a 
new thread to call ldap_result() in waiting (blocking) mode, and then 
notify your main thread when it returns.  If you are unable or 
unwilling to use threads (perfectly sensible) then concurrent 
process(es) can be used.

By the way, the only non-threadsafe function in the C standard library 
these days is strtok(); don't use that (or any function saving global 
state in static variables; meant to be called from more than one place) 
if you want your code to be threadsafe.

Cheers,
James

<Prev in Thread] Current Thread [Next in Thread>
  • RE: LDAP Client API in C with Notification of the end of a reques t, George Xu <=