26件ヒット
[1-26件を表示]
(0.015秒)
別のキーワード
クラス
-
Thread
:: Queue (12) -
Thread
:: SizedQueue (8) - ThreadsWait (6)
検索結果
先頭3件
-
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...