るりまサーチ (Ruby 2.3.0)

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

別のキーワード

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

クラス

検索結果

Thread#stop? -> bool (78367.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

Thread::Queue#num_waiting -> Integer (24064.0)

キューを待っているスレッドの数を返します。

キューを待っているスレッドの数を返します。

//emlist[例][ruby]{
require 'thread'

q = SizedQueue.new(1)
q.push(1)
t = Thread.new { q.push(2) }
sleep 0.05 until t.stop?
q.num_waiting # => 1

q.pop
t.join
//}