class Ractor::MovedObject
一个特殊对象,用于替换在 Ractor#send 或 Ractor::Port#send 中被移动到另一个 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)
Public Instance Methods
Source
static VALUE
ractor_moved_missing(int argc, VALUE *argv, VALUE self)
{
rb_raise(rb_eRactorMovedError, "can not send any methods to a moved object");
}