DB_ENV->set_thread_count |
#include <db.h>int DB_ENV->set_thread_count(DB_ENV *dbenv, u_int32_t count);
int DB_ENV->get_thread_count(DB_ENV *dbenv, u_int32_t *countp);
Declare an approximate number of threads in the database environment. The DB_ENV->set_thread_count method must be called prior to opening the database environment if the DB_ENV->failchk method will be used. The DB_ENV->set_thread_count method does not set the maximum number of threads but is used to determine memory sizing and the thread control block reclamation policy.
The database environment's thread count may also be configured using the environment's DB_CONFIG file. The syntax of the entry in that file is a single line with the string "set_thread_count", one or more whitespace characters, and the thread count. Because the DB_CONFIG file is read when the database environment is opened, it will silently overrule configuration done before that time.
The DB_ENV->set_thread_count method configures operations performed using the specified DB_ENV handle, not all operations performed on the underlying database environment.
The DB_ENV->set_thread_count method may not be called after the DB_ENV->open method is called.
The DB_ENV->set_thread_count method returns a non-zero error value on failure and 0 on success.
The DB_ENV->set_thread_count method may fail and return one of the following non-zero errors:
The DB_ENV->get_thread_count method returns the thread count.
The DB_ENV->get_thread_count method may be called at any time during the life of the application.
The DB_ENV->get_thread_count method returns a non-zero error value on failure and 0 on success.
Copyright (c) 1996-2006 Oracle Corporation - All rights reserved.