summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2023-10-13 01:31:02 +0900
committerKoichi Sasada <ko1@atdot.net>2023-10-13 02:11:29 +0900
commit2dca02e273489c802a9860284a17333ddf67f161 (patch)
tree18a125affb4eacfa52da3b1a076fb4a806ee5d88 /thread_pthread.c
parent1126bd8c65ab077392b559fedd8f9b07303313c9 (diff)
disable MN scheduler on !`USE_MN_THREADS`
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c7
1 files 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