[前][次][番号順一覧][スレッド一覧]

ruby-changes:63003

From: Koichi <ko1@a...>
Date: Fri, 18 Sep 2020 14:18:13 +0900 (JST)
Subject: [ruby-changes:63003] 06e9b94d40 (master): show object info to debug purpose.

https://git.ruby-lang.org/ruby.git/commit/?id=06e9b94d40

From 06e9b94d40a3c9f086fbdfe932b6614e18d10846 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Wed, 16 Sep 2020 09:11:16 +0900
Subject: show object info to debug purpose.


diff --git a/ractor.h b/ractor.h
index de4d722..640fc62 100644
--- a/ractor.h
+++ b/ractor.h
@@ -254,12 +254,13 @@ rb_ractor_confirm_belonging(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ractor.h#L254
     uint32_t id = rb_ractor_belonging(obj);
 
     if (id == 0) {
-        if (!rb_ractor_shareable_p(obj)) {
+        if (UNLIKELY(!rb_ractor_shareable_p(obj))) {
             rp(obj);
             rb_bug("id == 0 but not shareable");
         }
     }
-    else if (id != rb_ractor_current_id()) {
+    else if (UNLIKELY(id != rb_ractor_current_id())) {
+        rp(obj);
         rb_bug("rb_ractor_confirm_belonging object-ractor id:%u, current-ractor id:%u", id, rb_ractor_current_id());
     }
     return obj;
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]