]> git.sur5r.net Git - openldap/commitdiff
ITS#5364, thread pool efficiency:
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 10 Feb 2008 16:25:05 +0000 (16:25 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 10 Feb 2008 16:25:05 +0000 (16:25 +0000)
Use ldap_pvt_thread_pool_pausing(): pause check for slapd without locking.

servers/slapd/result.c

index d2302ebb6f1d606e986a572259e1fbe0c2e16683..795c9272ca23a4a5b9afb7a0f406356525ee592f 100644 (file)
@@ -743,8 +743,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
 
        /* Every 64 entries, check for thread pool pause */
        if ( ( ( rs->sr_nentries & 0x3f ) == 0x3f ) &&
-               ldap_pvt_thread_pool_query( &connection_pool,
-                       LDAP_PVT_THREAD_POOL_PARAM_PAUSING, &i ) == 0 && i )
+               ldap_pvt_thread_pool_pausing( &connection_pool ) > 0 )
        {
                return LDAP_BUSY;
        }