diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-09-16 09:11:16 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-09-18 14:17:49 +0900 |
commit | 06e9b94d40a3c9f086fbdfe932b6614e18d10846 (patch) | |
tree | 26cfec569a70f73476b628b741cdfe9a8a96fbc2 | |
parent | b416a7640278fbcb82d0ac37c0b71cf6e0dc4a36 (diff) |
show object info to debug purpose.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3548
-rw-r--r-- | ractor.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -254,12 +254,13 @@ rb_ractor_confirm_belonging(VALUE obj) 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; |