JezK
Edit File: cdesc-ThreadLocalVar.ri
U:RDoc::NormalClass[iI"ThreadLocalVar:EFI"Concurrent::ThreadLocalVar;FI"!ThreadLocalVarImplementation;To:RDoc::Markup::Document:@parts[o;;[ o:RDoc::Markup::Paragraph;[I"&@!macro [attach] thread_local_var;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim;[#I"TA `ThreadLocalVar` is a variable where the value is different for each thread. ;TI"SEach variable may have a default value, but when you modify the variable only ;TI"3the current thread will ever see that change. ;TI" ;TI"-@!macro thread_safe_variable_comparison ;TI" ;TI"@example ;TI"" v = ThreadLocalVar.new(14) ;TI" v.value #=> 14 ;TI" v.value = 2 ;TI" v.value #=> 2 ;TI" ;TI"@example ;TI"" v = ThreadLocalVar.new(14) ;TI" ;TI" t1 = Thread.new do ;TI" v.value #=> 14 ;TI" v.value = 1 ;TI" v.value #=> 1 ;TI" end ;TI" ;TI" t2 = Thread.new do ;TI" v.value #=> 14 ;TI" v.value = 2 ;TI" v.value #=> 2 ;TI" end ;TI" ;TI" v.value #=> 14 ;TI" ;TI"`@see https://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html Java ThreadLocal ;T:@format0o; ;[I"(@!macro thread_local_var_public_api;T: @fileI".lib/concurrent/atomic/thread_local_var.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ [ [[I" class;T[[:public[ [:protected[ [:private[ [I" instance;T[[;[ [;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[@5I"Concurrent;FcRDoc::NormalModule