るりまサーチ

最速Rubyリファレンスマニュアル検索!
26件ヒット [1-26件を表示] (0.015秒)
トップページ > クエリ:queue[x] > クエリ:empty?[x]

別のキーワード

  1. _builtin queue
  2. queue new
  3. queue pop
  4. queue push

ライブラリ

検索結果

Thread::Queue#empty? -> bool (21119.0)

キューが空の時、真を返します。

...キューが空の時、真を返します。

//emlist[例][ruby]{
require 'thread'
q = Queue.new
q.empty? # => true
q.push(:resource)
q.empty? # => false
//}...
...キューが空の時、真を返します。

//emlist[例][ruby]{
q = Queue.new
q.empty? # => true
q.push(:resource)
q.empty? # => false
//}...

Thread::SizedQueue#empty? -> bool (21101.0)

キューが空の時、真を返します。

キューが空の時、真を返します。

ThreadsWait#next_wait(nonblock = nil) -> Thread (12.0)

指定したスレッドのどれかが終了するまで待ちます。

...rue でかつ、キューが空の時、発生します。

#使用例
require 'thwait'

threads = []
2.times {|i|
threads << Thread.new { sleep i }
}

thall = ThreadsWait.new
thall.join_nowait(*threads)
until thall.empty?
th = thall.next_wait
p th
end

@see Queue#pop...