Note: things will break if nng_set_resolve_thread_max() is modified at runtime and more resolver are spawned. Not sure if this can actually happen.
Patch author: bionicbeagle Patch source: https://gist.github.com/bionicbeagle/4891eba6279ead5db5f501a60ff2b194 Discussion: https://github.com/nanomsg/nng/issues/1572#issuecomment-1332740743