Once more, mutex_lock -> trylock...

This commit is contained in:
Howard Chu 2009-03-05 22:46:03 +00:00
parent e3e7a22b5d
commit 5947a1692d

View file

@ -1258,8 +1258,11 @@ do_syncrepl(
if ( si == NULL )
return NULL;
/* There will never be more than one instance active */
ldap_pvt_thread_mutex_lock( &si->si_mutex );
/* Don't get stuck here while a pause is initiated */
while ( ldap_pvt_thread_mutex_trylock( &si->si_mutex )) {
if ( !ldap_pvt_thread_pool_pausecheck( &connection_pool ))
ldap_pvt_thread_yield();
}
switch( abs( si->si_type ) ) {
case LDAP_SYNC_REFRESH_ONLY: