summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-09-16 00:11:16 (GMT)
committerKoichi Sasada <ko1@atdot.net>2020-09-18 05:17:49 (GMT)
commit06e9b94d40a3c9f086fbdfe932b6614e18d10846 (patch)
tree26cfec569a70f73476b628b741cdfe9a8a96fbc2
parentb416a7640278fbcb82d0ac37c0b71cf6e0dc4a36 (diff)
show object info to debug purpose.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3548
-rw-r--r--ractor.h5
1 files changed, 3 insertions, 2 deletions
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)
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;