⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.116
Server IP:
78.40.11.138
Server:
Linux tango.o2switch.net 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
Thread
/
View File Name :
pending_interrupt%3f-c.ri
U:RDoc::AnyMethod[iI"pending_interrupt?:ETI"Thread::pending_interrupt?;TT:privateo: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