diff --git a/lib/redistat/buffer.rb b/lib/redistat/buffer.rb index 0caa508..66e4f3c 100644 --- a/lib/redistat/buffer.rb +++ b/lib/redistat/buffer.rb @@ -9,9 +9,16 @@ module Redistat end def size - @size ||= 0 + synchronize do + @size ||= 0 + end + end + + def size=(value) + synchronize do + @size = value + end end - attr_writer :size def count @count ||= 0