mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
show object info to debug purpose.
This commit is contained in:
parent
b416a76402
commit
06e9b94d40
Notes:
git
2020-09-18 14:18:19 +09:00
1 changed files with 3 additions and 2 deletions
5
ractor.h
5
ractor.h
|
@ -254,12 +254,13 @@ rb_ractor_confirm_belonging(VALUE obj)
|
||||||
uint32_t id = rb_ractor_belonging(obj);
|
uint32_t id = rb_ractor_belonging(obj);
|
||||||
|
|
||||||
if (id == 0) {
|
if (id == 0) {
|
||||||
if (!rb_ractor_shareable_p(obj)) {
|
if (UNLIKELY(!rb_ractor_shareable_p(obj))) {
|
||||||
rp(obj);
|
rp(obj);
|
||||||
rb_bug("id == 0 but not shareable");
|
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());
|
rb_bug("rb_ractor_confirm_belonging object-ractor id:%u, current-ractor id:%u", id, rb_ractor_current_id());
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
|
|
Loading…
Reference in a new issue