12件ヒット
  
    
      [1-12件を表示]
    
  
    (0.580秒)
  
  
    トップページ >  :Object#method
:Object#method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :singleton_methods
:singleton_methods![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :methods
:methods![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :main
:main![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :coverage
:coverage![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :enum_for
:enum_for![条件を削除 [x]](/images/drop-condition-icon.png) > クラス:Thread
 > クラス:Thread![条件を削除 [x]](/images/drop-condition-icon.png) 
  
 :Object#method
:Object#method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :singleton_methods
:singleton_methods![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :methods
:methods![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :main
:main![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :coverage
:coverage![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :enum_for
:enum_for![条件を削除 [x]](/images/drop-condition-icon.png) > クラス:Thread
 > クラス:Thread![条件を削除 [x]](/images/drop-condition-icon.png) 
  ライブラリ
- ビルトイン (12)
検索結果
- 
      Thread# [](name) -> object | nil (108.0) 
- 
      
      
      name に対応したスレッドに固有のデータを取り出します。 name に対応するスレッド固有データがなければ nil を返し ます。 ...emlist[例][ruby]{
 [
 Thread.new { Thread.current["name"] = "A" },
 Thread.new { Thread.current[:name] = "B" },
 Thread.new { Thread.current["name"] = "C" }
 ].each do |th|
 th.join
 puts "#{th.inspect}: #{th[:name]}"
 end
 # => #<Thread:0x00000002a54220 dead>: A
 # => #<Thread:0x00000002a541a8 d......0000002a54130 dead>: C
 //}
 Thread#[] と Thread#[]= を用いたスレッド固有の変数は
 Fiber を切り替えると異なる変数を返す事に注意してください。
 //emlist[][ruby]{
 def meth(newvalue)
 begin
 oldvalue = Thread.current[:name]
 Thread.current[:name] = newvalu.......resume
 p Thread.current[:name]
 # => nil if fiber-local
 # => 2 if thread-local (The value 2 is leaked to outside of meth method.)
 //}
 Fiber を切り替えても同じ変数を返したい場合は
 Thread#thread_variable_get と Thread#thread_variable_set
 を使用してください。
 Thread#[]=......ume
 p Thread.current[:name]
 # => nil if fiber-local
 # => 2 if thread-local (The value 2 is leaked to outside of meth method.)
 //}
 Fiber を切り替えても同じ変数を返したい場合は
 Thread#thread_variable_get と Thread#thread_variable_set
 を使用してください。
 @see Thread#fet...
