類別 Ractor::MovedObject

一個特殊物件,用於取代在 Ractor#sendRactor.yield 中已移至另一個 ractor 的任何值。嘗試存取物件會導致 Ractor::MovedError

r = Ractor.new { receive }

ary = [1, 2, 3]
r.send(ary, move: true)
p Ractor::MovedObject === ary
# => true
ary.inspect
# Ractor::MovedError (can not send any methods to a moved object)

公開實例方法

!(*args)
別名:method_missing
!=(*args)
別名:method_missing
==(*args)
別名:method_missing
__id__(*args)
別名:method_missing
__send__(*args)
別名:method_missing
equal?(*args)
別名:method_missing
instance_eval(*args)
別名:method_missing
instance_exec(*args)
別名:method_missing
method_missing(*args) 按一下以切換來源
static VALUE
ractor_moved_missing(int argc, VALUE *argv, VALUE self)
{
    rb_raise(rb_eRactorMovedError, "can not send any methods to a moved object");
}