るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

検索結果

Thread#group -> ThreadGroup (26213.0)

スレッドが属している ThreadGroup オブジェクトを返します。

...スレッドが属している ThreadGroup オブジェクトを返します。

p Thread.current.group == ThreadGroup::Default
# => true...

ThreadGroup#enclosed? -> bool (11022.0)

自身が enclose されているなら true を返します。そうでないなら false を返します。デフォルトは false です。

...ose されているなら true を返します。そうでないなら false を返します。デフォルトは false です。

freeze された ThreadGroup には Thread の追加/削除ができませんが、enclosed? は false を返します。

thg = ThreadGroup.new
p thg.enclosed?...
...# => false
thg.enclose
p thg.enclosed? # => true

thg = ThreadGroup.new
p thg.enclosed? # => false
thg.freeze
p thg.enclosed? # => false

@see ThreadGroup#enclose...