るりまサーチ

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

別のキーワード

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

検索結果

<< 1 2 3 > >>

Thread.stop -> nil (26109.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 (14137.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 (14102.0)

プロセスが現在停止(終了ではない)している場合に真を返します。 Process.#waitpid に Process::WUNTRACED フラグを設定した 場合にだけ真になりえます。

プロセスが現在停止(終了ではない)している場合に真を返します。
Process.#waitpid に Process::WUNTRACED フラグを設定した
場合にだけ真になりえます。

Process::Status#stopsig -> Integer | nil (14102.0)

stopped? が真の場合そのシグナルの番号を、そうでない場合は nil を返します。

...
stop
ped? が真の場合そのシグナルの番号を、そうでない場合は
nil を返します。...

StopIteration (14002.0)

イテレーションを止めるときに発生する例外です。

イテレーションを止めるときに発生する例外です。

絞り込み条件を変える

StopIteration#result -> object (11002.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 (8030.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 (8030.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 (8014.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) (8014.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...

絞り込み条件を変える

<< 1 2 3 > >>