るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.092秒)
トップページ > クエリ:t[x] > クエリ:stop?[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

クラス

検索結果

Thread#stop? -> bool (24213.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 (6124.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
//}...