るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.024秒)
トップページ > バージョン:2.5.0[x] > クエリ:y[x] > ライブラリ:thwait[x]

別のキーワード

  1. psych psych_y
  2. psych y
  3. kernel y
  4. kernel psych_y

クラス

キーワード

検索結果

ThreadsWait#empty? -> bool (18307.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#threads -> Array (307.0)

同期されるスレッドの一覧を配列で返します。

...同期されるスレッドの一覧を配列で返します。

使用例
require 'thwait'

threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}

thall = ThreadsWait.new(*threads)
p thall.threads
#=> [#<Thread:0x21750 sleep>, #<Thread:0x216c4 sleep>, #<...