Skip to content

Commit

Permalink
disable MN scheduler on !USE_MN_THREADS
Browse files Browse the repository at this point in the history
  • Loading branch information
ko1 committed Oct 12, 2023
1 parent 10ba3fc commit 146171a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions thread_pthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 146171a

Please sign in to comment.