4件ヒット
[1-4件を表示]
(0.060秒)
検索結果
先頭4件
-
Thread
. main -> Thread (63625.0) -
メインスレッドを返します。
メインスレッドを返します。
p Thread.main #=> #<Thread:0x4022e6fc run> -
Thread
. pass -> nil (9076.0) -
他のスレッドに実行権を譲ります。実行中のスレッドの状態を変えずに、 他の実行可能状態のスレッドに制御を移します。
他のスレッドに実行権を譲ります。実行中のスレッドの状態を変えずに、
他の実行可能状態のスレッドに制御を移します。
Thread.new do
(1..3).each{|i|
p i
Thread.pass
}
exit
end
loop do
Thread.pass
p :main
end
#=>
1
:main
2
:main
3
:main -
Thread
. report _ on _ exception -> bool (9022.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $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 `block in <main>'
1: fro... -
Thread
. report _ on _ exception=(newstate) (9022.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $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 `block in <main>'
1: fro...