るりまサーチ

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

別のキーワード

  1. _builtin all?
  2. pop delete_all
  3. pop3 delete_all
  4. net/pop delete_all
  5. pop all

ライブラリ

クラス

検索結果

ThreadsWait.all_waits(*threads) -> () (27214.0)

指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。

...スレッドを一つもしくは複数指定します。

require 'thwait'

threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
ThreadsWait.all_waits(*threads) {|th| printf("end %s\n", th.inspect) }

# 出力例
#=> #<Thread:0x21584 run>
#=> #<Thread:...

ThreadsWait.all_waits(*threads) {|thread| ...} -> () (27214.0)

指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。

...スレッドを一つもしくは複数指定します。

require 'thwait'

threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
ThreadsWait.all_waits(*threads) {|th| printf("end %s\n", th.inspect) }

# 出力例
#=> #<Thread:0x21584 run>
#=> #<Thread:...

ThreadsWait#all_waits -> () (27213.0)

指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。

...にブロックを評価します。

使用例
require 'thwait'

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

thall = ThreadsWait.new(*threads)
thall.all_waits{|th|
printf("end %s\n", th.inspect)
}

# 出力例
#=> #<Thread:0x214bc r...

ThreadsWait.new(*threads) -> ThreadsWait (3112.0)

指定されたスレッドの終了をまつための、スレッド同期オブジェクトをつくります。

...もしくは複数指定します。

使用例
require 'thwait'

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

thall = ThreadsWait.new(*threads)
thall.all_waits{|th|
printf("end %s\n", th.inspect)
}

# 出力例
#=> #<Thread:0x214bc r...