別のキーワード
種類
- インスタンスメソッド (179)
- クラス (44)
- 特異メソッド (22)
クラス
-
Encoding
:: Converter (44) -
Process
:: Status (22) - StopIteration (11)
- Thread (104)
-
Thread
:: Queue (9) - Time (11)
キーワード
- Status (11)
- StopIteration (11)
- Thread (11)
- ThreadError (11)
- alive? (11)
- backtrace (11)
-
handle
_ interrupt (11) -
num
_ waiting (9) -
primitive
_ convert (44) -
report
_ on _ exception (8) -
report
_ on _ exception= (8) - result (11)
- run (11)
- status (11)
- stop? (11)
- stopped? (11)
- stopsig (11)
- strftime (11)
- wakeup (11)
検索結果
先頭5件
-
Thread
. stop -> nil (18109.0) -
他のスレッドから Thread#run メソッドで再起動されるまで、カレ ントスレッドの実行を停止します。
...ドから Thread#run メソッドで再起動されるまで、カレ
ントスレッドの実行を停止します。
//emlist[例][ruby]{
a = Thread.new { print "a"; Thread.stop; print "c" }
sleep 0.1 while a.status!='sleep'
print "b"
a.run
a.join
# => "abc"
//}
@see Thread#run, Thread#wakeup... -
Thread
# stop? -> bool (6137.0) -
スレッドが終了(dead)あるいは停止(stop)している時、true を返します。
...スレッドが終了(dead)あるいは停止(stop)している時、true を返します。
//emlist[例][ruby]{
a = Thread.new { Thread.stop }
b = Thread.current
a.stop? # => true
b.stop? # => false
//}
@see Thread#alive?, Thread#status... -
Process
:: Status # stopped? -> bool (6102.0) -
プロセスが現在停止(終了ではない)している場合に真を返します。 Process.#waitpid に Process::WUNTRACED フラグを設定した 場合にだけ真になりえます。
プロセスが現在停止(終了ではない)している場合に真を返します。
Process.#waitpid に Process::WUNTRACED フラグを設定した
場合にだけ真になりえます。 -
Process
:: Status # stopsig -> Integer | nil (6102.0) -
stopped? が真の場合そのシグナルの番号を、そうでない場合は nil を返します。
...
stopped? が真の場合そのシグナルの番号を、そうでない場合は
nil を返します。... -
StopIteration (6002.0)
-
イテレーションを止めるときに発生する例外です。
イテレーションを止めるときに発生する例外です。 -
StopIteration
# result -> object (3002.0) -
この例外オブジェクトを発生させる原因となったメソッド等の返り値を返します。
...ect = Object.new
def object.each
yield :yield1
yield :yield2
:each_returned
end
enumerator = object.to_enum
p enumerator.next #=> :yield1
p enumerator.next #=> :yield2
begin
enumerator.next
rescue StopIteration => error
p error.result #=> :each_returned
end... -
Thread
# run -> self (30.0) -
停止状態(stop)のスレッドを再開させます。 Thread#wakeup と異なりすぐにスレッドの切り替え を行います。
...止状態(stop)のスレッドを再開させます。
Thread#wakeup と異なりすぐにスレッドの切り替え
を行います。
@raise ThreadError 死んでいるスレッドに対して実行すると発生します。
//emlist[例][ruby]{
a = Thread.new { puts "a"; Thread.stop; puts "c"......}
sleep 0.1 while a.status!='sleep'
puts "Got here"
a.run
a.join
# => a
# => Got here
# => c
//}
@see Thread#wakeup, Thread.stop... -
Thread
# wakeup -> self (30.0) -
停止状態(stop)のスレッドを実行可能状態(run)にします。
...停止状態(stop)のスレッドを実行可能状態(run)にします。
@raise ThreadError 死んでいるスレッドに対して実行すると発生します。
//emlist[例][ruby]{
c = Thread.new { Thread.stop; puts "hey!" }
sleep 0.1 while c.status!='sleep'
c.wakeup
c.join
# => "hey!"
//}......@see Thread#run, Thread.stop... -
Thread
# report _ on _ exception -> bool (14.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Thread:0x00007fc3f48c7908@(irb):1 run> terminated with exception......aceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<Thread:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception... -
Thread
# report _ on _ exception=(newstate) (14.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Thread:0x00007fc3f48c7908@(irb):1 run> terminated with exception......aceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<Thread:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception...