⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Thread
/
View File Name :
pending_interrupt%3f-c.ri
U:RDoc::AnyMethod[iI"pending_interrupt?:ETI"Thread::pending_interrupt?;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"<Returns whether or not the asynchronous queue is empty.;To:RDoc::Markup::BlankLine o; ; [I"NSince Thread::handle_interrupt can be used to defer asynchronous events, ;TI"Kthis method can be used to determine if there are any deferred events.;T@o; ; [I"OIf you find this method returns true, then you may finish +:never+ blocks.;T@o; ; [I"NFor example, the following method processes deferred asynchronous events ;TI"immediately.;T@o:RDoc::Markup::Verbatim; [ I"+def Thread.kick_interrupt_immediately ;TI"7 Thread.handle_interrupt(Object => :immediate) { ;TI" Thread.pass ;TI" } ;TI" end ;T:@format0o; ; [I"KIf +error+ is given, then check only for +error+ type deferred events.;T@S:RDoc::Markup::Heading: leveli: textI" Usage;T@o;; [I"th = Thread.new{ ;TI"> Thread.handle_interrupt(RuntimeError => :on_blocking){ ;TI" while true ;TI" ... ;TI"2 # reach safe point to invoke interrupt ;TI"( if Thread.pending_interrupt? ;TI"= Thread.handle_interrupt(Object => :immediate){} ;TI" end ;TI" ... ;TI" end ;TI" } ;TI"} ;TI" ... ;TI"th.raise # stop thread ;T; 0o; ; [I"PThis example can also be written as the following, which you should use to ;TI"#avoid asynchronous interrupts.;T@o;; [I"flag = true ;TI"th = Thread.new{ ;TI"> Thread.handle_interrupt(RuntimeError => :on_blocking){ ;TI" while true ;TI" ... ;TI"2 # reach safe point to invoke interrupt ;TI"" break if flag == false ;TI" ... ;TI" end ;TI" } ;TI"} ;TI" ... ;TI"flag = false # stop thread;T; 0: @fileI" thread.c;T:0@omit_headings_from_table_of_contents_below0I":Thread.pending_interrupt?(error = nil) -> true/false ;T0[ I"(*args);T@IFI"Thread;TcRDoc::NormalClass00