ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- U:RDoc::AnyMethod[iI"new:ETI"Ractor::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"/Create a new Ractor with args and a block.;To:RDoc::Markup::BlankLineo; ; [I"OA block (Proc) will be isolated (can't access to outer variables). +self+ ;TI"7inside the block will refer to the current Ractor.;T@o:RDoc::Markup::Verbatim; [I"8r = Ractor.new { puts "Hi, I am #{self.inspect}" } ;TI" r.take ;TI"8# Prints "Hi, I am #" ;T: @format0o; ; [I"X+args+ passed to the method would be propagated to block args by the same rules as ;TI"Tobjects passed through #send/Ractor.receive: if +args+ are not shareable, they ;TI"Cwill be copied (via deep cloning, which might be inefficient).;T@o; ; [I"arg = [1, 2, 3] ;TI"0puts "Passing: #{arg} (##{arg.object_id})" ;TI")r = Ractor.new(arg) {|received_arg| ;TI"E puts "Received: #{received_arg} (##{received_arg.object_id})" ;TI"} ;TI" r.take ;TI"# Prints: ;TI"## Passing: [1, 2, 3] (#280) ;TI"$# Received: [1, 2, 3] (#300) ;T; 0o; ; [I"7Ractor's +name+ can be set for debugging purposes:;T@o; ; [I"*r = Ractor.new(name: 'my ractor') {} ;TI" p r ;TI"4#=> #;T; 0: @fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I"=Ractor.new(*args, name: nil) {|*args| block } -> ractor ;T0[I"(*args, name: nil, &block);T@0FI" Ractor;TcRDoc::NormalClass00