summaryrefslogtreecommitdiff
path: root/ractor.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-23 13:34:11 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-23 13:39:48 +0900
commit7e44ade5658bc6ae16e9838c64ff9e90d4fd805e (patch)
treefbf52f7492c1a817bd685bdb9f133f206cf7e2c7 /ractor.c
parent02233ed024095d67683330b2ee9df08d943a5cd0 (diff)
ruby_single_main_ractor should be clear before warn
rb_warn can produce T_HASA object and it should not use transient heap.
Diffstat (limited to 'ractor.c')
-rw-r--r--ractor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ractor.c b/ractor.c
index a4ece101a1..7675a09832 100644
--- a/ractor.c
+++ b/ractor.c
@@ -1386,13 +1386,13 @@ cancel_single_ractor_mode(void)
rb_gc_start();
rb_transient_heap_evacuate();
+ ruby_single_main_ractor = NULL;
+
if (rb_warning_category_enabled_p(RB_WARN_CATEGORY_EXPERIMENTAL)) {
rb_category_warn(RB_WARN_CATEGORY_EXPERIMENTAL,
"Ractor is experimental, and the behavior may change in future versions of Ruby! "
"Also there are many implementation issues.");
}
-
- ruby_single_main_ractor = NULL;
}
static void