るりまサーチ

最速Rubyリファレンスマニュアル検索!
106件ヒット [101-106件を表示] (0.155秒)

別のキーワード

  1. socket iff_802_1q_vlan
  2. openssl q
  3. openssl q=
  4. rsa q
  5. dsa q

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 >>

Thread::Queue#close -> self (3025.0)

キューを close します。close 済みのキューを再度 open することはできません。

...Queue#closed? は true を返します
* Thread::Queue#close は無視されます
* Thread::Queue#enq/push/<< は ClosedQueueError を発生します
* Thread::Queue#empty? が false を返す場合は Thread::Queue#deq/pop/shift は通常通りオブジェクトを返します

また、ClosedQ...
...ueueError は StopIteration を継承しているため、
close する事でループから脱出する事もできます。

例:

q
= Queue.new
Thread.new{
while e = q.deq # wait for nil to break loop
# ...
end
}
q
.close...
<< < 1 2 >>