D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Thread
/
Filename :
new-c.ri
back
Copy
U:RDoc::AnyMethod[iI"new:ETI"Thread::new;TT:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"4Creates a new thread executing the given block.;To:RDoc::Markup::BlankLine o; ; [I";Any +args+ given to ::new will be passed to the block:;T@o:RDoc::Markup::Verbatim; [ I"arr = [] ;TI"a, b, c = 1, 2, 3 ;TI";Thread.new(a,b,c) { |d,e,f| arr << d << e << f }.join ;TI"arr #=> [1, 2, 3] ;T:@format0o; ; [I"JA ThreadError exception is raised if ::new is called without a block.;T@o; ; [I"GIf you're going to subclass Thread, be sure to call super in your ;TI"A+initialize+ method, otherwise a ThreadError will be raised.;T: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I"�Thread.new { ... } -> thread Thread.new(*args, &proc) -> thread Thread.new(*args) { |args| ... } -> thread ;T0[ I"(*args);T@FI"Thread;TcRDoc::NormalClass00