Skip to content

Commit

Permalink
Disable GC call for multi-ractor mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dugiahuy committed Feb 7, 2024
1 parent babdb15 commit f7cbe23
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ractor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,9 @@ cancel_single_ractor_mode(void)
// enable multi-ractor mode
RUBY_DEBUG_LOG("enable multi-ractor mode");

#if USE_MMTK
// disable GC call for multi-ractor mode
#else
VALUE was_disabled = rb_gc_enable();

rb_gc_start();
Expand All @@ -1432,7 +1435,7 @@ cancel_single_ractor_mode(void)
if (was_disabled) {
rb_gc_disable();
}

#endif
ruby_single_main_ractor = NULL;

if (rb_warning_category_enabled_p(RB_WARN_CATEGORY_EXPERIMENTAL)) {
Expand Down

0 comments on commit f7cbe23

Please sign in to comment.