From a9e98e546c4cf40251435b3d0e84b9ac980a9623 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 1 Jan 2024 15:07:00 -0800 Subject: fixes #1572 nng creates too many threads This further limits some of the thread counts, but principally it offers a new runtime facility, nng_init_set_parameter(), which can be used to set certain runtime parameters on the number of threads, provided it is called before the rest of application start up. This facility is quite intentionally "undocumented", at least for now, as we want to limit our commitment to it. Still this should be helpful for applications that need to reduce the number of threads that are created. --- src/nng.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nng.c') diff --git a/src/nng.c b/src/nng.c index ce75d832..965aab86 100644 --- a/src/nng.c +++ b/src/nng.c @@ -2011,3 +2011,9 @@ nng_version(void) return (xstr(NNG_MAJOR_VERSION) "." xstr(NNG_MINOR_VERSION) "." xstr( NNG_PATCH_VERSION) NNG_RELEASE_SUFFIX); } + +void +nng_init_set_parameter(nng_init_parameter p, uint64_t value) +{ + nni_init_set_param(p, value); +} \ No newline at end of file -- cgit v1.2.3-70-g09d2