るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.018秒)

別のキーワード

  1. _builtin inspect
  2. csv inspect
  3. inspect _builtin
  4. matrix inspect
  5. set inspect

クラス

キーワード

検索結果

ThreadsWait#all_waits -> () (8.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 run>...

ThreadsWait.all_waits(*threads) -> () (8.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:0x2161...

ThreadsWait.all_waits(*threads) {|thread| ...} -> () (8.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:0x2161...

ThreadsWait.new(*threads) -> ThreadsWait (8.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 run>...