From 2dca02e273489c802a9860284a17333ddf67f161 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Fri, 13 Oct 2023 01:31:02 +0900 Subject: disable MN scheduler on !`USE_MN_THREADS` --- thread_pthread.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/thread_pthread.c b/thread_pthread.c index 0649709265..9c4310d5c9 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1622,13 +1622,16 @@ ruby_mn_threads_params(void) bool enable_mn_threads; if (mn_threads_cstr && (enable_mn_threads = atoi(mn_threads_cstr) > 0)) { - if (RTEST(ruby_verbose)) { #if USE_MN_THREADS + if (RTEST(ruby_verbose)) { fprintf(stderr, "RUBY_MN_THREADS = %s (default: 0)\n", mn_threads_cstr); + } #else + enable_mn_threads = false; + if (RTEST(ruby_verbose)) { fprintf(stderr, "RUBY_MN_THREADS = %s is specified, but MN threads are not implmeented on this executable.", mn_threads_cstr); -#endif } +#endif } else { enable_mn_threads = false; // default: off on main Ractor -- cgit v1.2.3