2件ヒット
[1-2件を表示]
(0.017秒)
クラス
- ThreadsWait (2)
検索結果
-
ThreadsWait
# empty? -> bool (25.0) -
同期されるスレッドが存在するならば true をかえします。
...同期されるスレッドが存在するならば true をかえします。
使用例
require 'thwait'
threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads.empty? #=> true
thall.join(*threads)
p thall.threa... -
ThreadsWait
# finished? -> bool (25.0) -
すでに終了したスレッドが存在すれば true を返します。
...すでに終了したスレッドが存在すれば true を返します。
使用例
require 'thwait'
threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new(*threads)
p thall.finished? #=> false
sleep 3
p thall.finished? #=> t...