るりまサーチ

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

別のキーワード

  1. bigdecimal limit
  2. csv field_size_limit
  3. bigdecimal save_limit
  4. rexml/document entity_expansion_limit
  5. rexml/document entity_expansion_limit=

ライブラリ

検索結果

Thread#join(limit) -> self | nil (120.0)

スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。

...レッドに対して発生します。

limit
を指定して、limit 秒過ぎても自身が終了しない場合、nil を返します。

@param limit タイムアウトする時間を整数か小数で指定します。単位は秒です。

@raise ThreadError join を実行することによ...
...

以下は、生成したすべてのスレッドの終了を待つ例です。

thread
s = []
thread
s.push(Thread.new { n = rand(5); sleep n; n })
thread
s.push(Thread.new { n = rand(5); sleep n; n })
thread
s.push(Thread.new { n = rand(5); sleep n; n })

thread
s.each {|t| t.join}...

Thread#join -> self (20.0)

スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。

...レッドに対して発生します。

limit
を指定して、limit 秒過ぎても自身が終了しない場合、nil を返します。

@param limit タイムアウトする時間を整数か小数で指定します。単位は秒です。

@raise ThreadError join を実行することによ...
...

以下は、生成したすべてのスレッドの終了を待つ例です。

thread
s = []
thread
s.push(Thread.new { n = rand(5); sleep n; n })
thread
s.push(Thread.new { n = rand(5); sleep n; n })
thread
s.push(Thread.new { n = rand(5); sleep n; n })

thread
s.each {|t| t.join}...