⚝
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
/
Queue
/
Edit File: close-i.ri
U:RDoc::AnyMethod[iI" close:ETI"Queue#close;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I":Closes the queue. A closed queue cannot be re-opened.;To:RDoc::Markup::BlankLine o; ; [I"?After the call to close completes, the following are true:;T@o:RDoc::Markup::List: @type:BULLET:@items[ o:RDoc::Markup::ListItem:@label0; [o; ; [I"+closed?+ will return true;T@o;;0; [o; ; [I"+close+ will be ignored.;T@o;;0; [o; ; [I"9calling enq/push/<< will raise a +ClosedQueueError+.;T@o;;0; [o; ; [I"Iwhen +empty?+ is false, calling deq/pop/shift will return an object ;TI"from the queue as usual.;To;;0; [o; ; [I"Xwhen +empty?+ is true, deq(false) will not suspend the thread and will return nil. ;TI"*deq(true) will raise a +ThreadError+.;T@o; ; [I"XClosedQueueError is inherited from StopIteration, so that you can break loop block.;T@o:RDoc::Markup::Verbatim; [I"Example: ;TI" ;TI" q = Queue.new ;TI" Thread.new{ ;TI"8 while e = q.deq # wait for nil to break loop ;TI" # ... ;TI" end ;TI" } ;TI" q.close;T:@format0: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0I"close ;T0[ I"();T@=FI" Queue;TcRDoc::NormalClass00
Simpan