U:RDoc::AnyMethod[iI"add:ETI"ThreadGroup#add;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"GAdds the given +thread+ to this group, removing it from any other ;TI"9group to which it may have previously been a member.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I":puts "Initial group is #{ThreadGroup::Default.list}" ;TI"tg = ThreadGroup.new ;TI"t1 = Thread.new { sleep } ;TI"t2 = Thread.new { sleep } ;TI"puts "t1 is #{t1}" ;TI"puts "t2 is #{t2}" ;TI"tg.add(t1) ;TI";puts "Initial group now #{ThreadGroup::Default.list}" ;TI"$puts "tg group now #{tg.list}" ;T: @format0o; ; [I"This will produce:;T@o; ; [ I"+Initial group is # ;TI" t1 is # ;TI" t2 is # ;TI"@Initial group now ## ;TI"&tg group now #;T; 0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I""thgrp.add(thread) -> thgrp ;T0[I" (p1);T@%FI"ThreadGroup;TcRDoc::NormalClass00