210件ヒット
[201-210件を表示]
(0.096秒)
ライブラリ
- ビルトイン (102)
- delegate (12)
- forwardable (24)
-
irb
/ cmd / pushws (12) - mkmf (48)
- thread (12)
クラス
- Array (32)
-
IRB
:: ExtendCommand :: PushWorkspace (12) -
Thread
:: Queue (46) -
Thread
:: SizedQueue (36)
モジュール
- Forwardable (24)
- Kernel (60)
キーワード
- DelegateClass (12)
- append (8)
- close (10)
-
def
_ delegator (12) -
def
_ instance _ delegator (12) - deq (24)
-
enable
_ config (24) - execute (12)
- pop (24)
- prepend (8)
- shift (24)
- unshift (8)
-
with
_ config (24)
検索結果
-
Thread
:: Queue # close -> self (13.0) -
キューを close します。close 済みのキューを再度 open することはできません。
...のように動作します。
* Thread::Queue#closed? は true を返します
* Thread::Queue#close は無視されます
* Thread::Queue#enq/push/<< は ClosedQueueError を発生します
* Thread::Queue#empty? が false を返す場合は Thread::Queue#deq/pop/shift は通常通りオブ......ジェクトを返します
また、ClosedQueueError は StopIteration を継承しているため、
close する事でループから脱出する事もできます。
例:
q = Queue.new
Thread.new{
while e = q.deq # wait for nil to break loop
# ...
end
}
q.close...