るりまサーチ

最速Rubyリファレンスマニュアル検索!
16件ヒット [1-16件を表示] (0.290秒)
トップページ > クラス:Thread[x] > 種類:特異メソッド[x] > クエリ:new[x] > クエリ:report_on_exception[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

検索結果

Thread.report_on_exception -> bool (18128.0)

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...内容を $stderr に報告します。

デフォルトは false です。

Thread
.new { 1.times { raise } }

は $stderr に以下のように出力します:

#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in...
...終了しないようにするのがより良い方法です。
* Thread#join や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。し...
...を待つことができなかったりするかもしれません。

スレッドごとに設定する方法は Thread#report_on_exception= を参照してください。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false...
...内容を $stderr に報告します。

デフォルトは true です。

Thread
.new { 1.times { raise } }

は $stderr に以下のように出力します:

#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `...

Thread.report_on_exception=(newstate) (6228.0)

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...内容を $stderr に報告します。

デフォルトは false です。

Thread
.new { 1.times { raise } }

は $stderr に以下のように出力します:

#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in...
...終了しないようにするのがより良い方法です。
* Thread#join や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。し...
...を待つことができなかったりするかもしれません。

スレッドごとに設定する方法は Thread#report_on_exception= を参照してください。

@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false...
...内容を $stderr に報告します。

デフォルトは true です。

Thread
.new { 1.times { raise } }

は $stderr に以下のように出力します:

#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `...