class 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");
}