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::BlankLineo; ; [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")calling enq/push/<< will return nil.;T@o;;0; [o; ; [I"Iwhen +empty?+ is false, calling deq/pop/shift will return an object ;TI"from the queue as usual.;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@7FI" Queue;TcRDoc::NormalClass00