mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
ITS#3471 don't yield unnecessarily
This commit is contained in:
parent
76907a2e44
commit
b18bc61831
1 changed files with 6 additions and 0 deletions
|
|
@ -1714,10 +1714,12 @@ slapd_daemon_task(
|
|||
|
||||
case 0: /* timeout - let threads run */
|
||||
ebadf = 0;
|
||||
#ifndef HAVE_YIELDING_SELECT
|
||||
Debug( LDAP_DEBUG_CONNS, "daemon: select timeout - yielding\n",
|
||||
0, 0, 0 );
|
||||
|
||||
ldap_pvt_thread_yield();
|
||||
#endif
|
||||
continue;
|
||||
|
||||
default: /* something happened - deal with it */
|
||||
|
|
@ -1770,7 +1772,9 @@ slapd_daemon_task(
|
|||
|
||||
/* bypass the following tests if no descriptors left */
|
||||
if ( ns <= 0 ) {
|
||||
#ifndef HAVE_YIELDING_SELECT
|
||||
ldap_pvt_thread_yield();
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1966,7 +1970,9 @@ slapd_daemon_task(
|
|||
}
|
||||
#endif /* SLAP_EVENTS_ARE_INDEXED */
|
||||
|
||||
#ifndef HAVE_YIELDING_SELECT
|
||||
ldap_pvt_thread_yield();
|
||||
#endif
|
||||
}
|
||||
|
||||
if( slapd_shutdown == 1 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue