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

Is allowed that two threads fetch results simultaneously ?



I have two questions.
 
1.  Can two different threads  call each ldap_add() simultaneously?.
 
     Doesn't it care?. Is it a bad idea?
 
2. Similarly Can two different threads call each fetch ldap's result simultaneously?
 
    ldap's result fetching means it below
  
      int rc = ldap_result();
     msg = ldap_first_message();
    ..
     msg = ldap_next_message ();
    ...
 
I know a socket is a file.
 
If Two threads write to a file randomly, It will cause a problem,
 
I'm very confused about ldap's asynchronous behaviour whether it resembles a regular file's behaviour.
 
Thank u