| Server IP : 162.214.74.102 / Your IP : 216.73.217.21 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Thread/ |
Upload File : |
U:RDoc::AnyMethod[iI" join:ETI"Thread#join;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"BThe calling thread will suspend execution and run this +thr+.;To:RDoc::Markup::BlankLine o;
; [I"ODoes not return until +thr+ exits or until the given +limit+ seconds have ;TI"passed.;T@o;
; [I"KIf the time limit expires, +nil+ will be returned, otherwise +thr+ is ;TI"returned.;T@o;
; [I"GAny threads not joined will be killed when the main program exits.;T@o;
; [I"QIf +thr+ had previously raised an exception and the ::abort_on_exception or ;TI"Q$DEBUG flags are not set, (so the exception has not yet been processed), it ;TI"$will be processed at this time.;T@o:RDoc::Markup::Verbatim; [ I"Ca = Thread.new { print "a"; sleep(10); print "b"; print "c" }
;TI"Ex = Thread.new { print "x"; Thread.pass; print "y"; print "z" }
;TI"Dx.join # Let thread x finish, thread a will be killed on exit.
;TI"#=> "axyz"
;T:@format0o;
; [I"=The following example illustrates the +limit+ parameter.;T@o;; [I">y = Thread.new { 4.times { sleep 0.1; puts 'tick... ' }}
;TI"'puts "Waiting" until y.join(0.15)
;T;
0o;
; [I"This will produce:;T@o;; [I"
tick...
;TI"
Waiting
;TI"
tick...
;TI"
Waiting
;TI"
tick...
;TI"tick...;T;
0:
@fileI"
thread.c;T:0@omit_headings_from_table_of_contents_below0I"7thr.join -> thr
thr.join(limit) -> thr
;T0[ I"(p1 = v1);T@7FI"Thread;TcRDoc::NormalClass00