active_threads++;
ldap_pvt_thread_mutex_unlock( &active_threads_mutex );
- status = ldap_pvt_thread_create( &arg->co_op->o_tid, 1,
- connection_operation, (void *) arg );
+ status = ldap_pvt_thread_pool_submit( connection_pool, connection_operation, (void *) arg );
if ( status != 0 ) {
Debug( LDAP_DEBUG_ANY,
}
}
+ ldap_pvt_thread_pool_destroy(connection_pool, 1);
+
ldap_pvt_thread_mutex_lock( &active_threads_mutex );
Debug( LDAP_DEBUG_ANY,
"slapd shutdown: waiting for %d threads to terminate\n",
int active_threads;
ldap_pvt_thread_mutex_t active_threads_mutex;
ldap_pvt_thread_cond_t active_threads_cond;
+ldap_pvt_thread_pool_t connection_pool;
ldap_pvt_thread_mutex_t gmtime_mutex;
#ifdef SLAPD_CRYPT
slap_name = name;
(void) ldap_pvt_thread_initialize();
+ ldap_pvt_thread_pool_initialize(&connection_pool, 0, 0);
ldap_pvt_thread_mutex_init( &active_threads_mutex );
ldap_pvt_thread_cond_init( &active_threads_cond );
LIBSLAPD_F (ldap_pvt_thread_mutex_t) active_threads_mutex;
LIBSLAPD_F (ldap_pvt_thread_cond_t) active_threads_cond;
+LIBSLAPD_F (ldap_pvt_thread_pool_t) connection_pool;
LIBSLAPD_F (ldap_pvt_thread_mutex_t) entry2str_mutex;
LIBSLAPD_F (ldap_pvt_thread_mutex_t) replog_mutex;