*** cache.rb 2011-11-28 11:39:48.861984055 +0100 --- /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.0/lib/odba/cache.rb 2011-11-28 11:40:18.640798211 +0100 *************** *** 95,106 **** end counter = 0 cutoff = offset + @cleaner_step ! holder.each_value { |value| ! counter += 1 ! if(counter > offset && value.odba_old?(retire_time)) ! value.odba_retire && @cleaned += 1 ! end ! return cutoff if(counter > cutoff) } cutoff # every once in a while we'll get a 'hash modified during iteration'-Error. --- 95,108 ---- end counter = 0 cutoff = offset + @cleaner_step ! @cache_mutex.synchronize { ! holder.each_value { |value| ! counter += 1 ! if(counter > offset && value.odba_old?(retire_time)) ! value.odba_retire && @cleaned += 1 ! end ! return cutoff if(counter > cutoff) ! } } cutoff # every once in a while we'll get a 'hash modified during iteration'-Error.