OSSL_set_max_threads

Set the maximum number of threads the OpenSSL thread pool may use for ctx.

Synopsis

Declared in <openssl/thread.h>

int
OSSL_set_max_threads(
    OSSL_LIB_CTX* ctx,
    uint64_t max_threads);

Return Value

1 on success, or 0 if thread pooling is unsupported or the call fails.

Parameters

NameDescription
ctxLibrary context whose pool limit is updated, or NULL for the default.
max_threadsMaximum pool size; 0 disables the pool and tears down existing pool threads.