JezK
Edit File: cdesc-Adder.ri
U:RDoc::NormalClass[iI" Adder:EFI"(Concurrent::ThreadSafe::Util::Adder;FI"Striped64;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"GA Ruby port of the Doug Lea's jsr166e.LondAdder class version 1.8 ;TI" available in public domain.;To:RDoc::Markup::BlankLine o; ;[I"*Original source code available here: ;TI"`http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/jsr166e/LongAdder.java?revision=1.8;T@o; ;[ I"DOne or more variables that together maintain an initially zero ;TI"Dsum. When updates (method +add+) are contended across threads, ;TI"Ethe set of variables may grow dynamically to reduce contention. ;TI"@Method +sum+ returns the current total combined across the ;TI"#variables maintaining the sum.;T@o; ;[I"HThis class is usually preferable to single +Atomic+ reference when ;TI"Imultiple threads update a common sum that is used for purposes such ;TI"Das collecting statistics, not for fine-grained synchronization ;TI"Icontrol. Under low update contention, the two classes have similar ;TI"Hcharacteristics. But under high contention, expected throughput of ;TI"Hthis class is significantly higher, at the expense of higher space ;TI"consumption.;T@o; ;[I"@!visibility private;T: @fileI"-lib/concurrent/thread_safe/util/adder.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ [ [[I" class;T[[:public[ [:protected[ [:private[ [I" instance;T[[; [ [I"add;FI"-lib/concurrent/thread_safe/util/adder.rb;T[I"decrement;F@?[I"increment;F@?[I" reset;F@?[I"sum;F@?[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@*I"!Concurrent::ThreadSafe::Util;FcRDoc::NormalModule