pub unsafe extern "C" fn mdb_env_set_maxreaders(
    env: *mut MDB_env,
    readers: c_uint
) -> c_int
Expand description

@brief Set the maximum number of threads/reader slots for the environment.

This defines the number of slots in the lock table that is used to track readers in the the environment. The default is 126. Starting a read-only transaction normally ties a lock table slot to the current thread until the environment closes or the thread exits. If MDB_NOTLS is in use, #mdb_txn_begin() instead ties the slot to the MDB_txn object until it or the #MDB_env object is destroyed. This function may only be called after #mdb_env_create() and before #mdb_env_open(). @param[in] env An environment handle returned by #mdb_env_create() @param[in] readers The maximum number of reader lock table slots @return A non-zero error value on failure and 0 on success. Some possible errors are:

  • EINVAL - an invalid parameter was specified, or the environment is already open.