# File lib/mini_profiler/storage/memory_store.rb, line 64 def initialize_cleanup_thread(args={}) cleanup_interval = args.fetch(:cleanup_interval) { CLEANUP_INTERVAL } cleanup_cycle = args.fetch(:cleanup_cycle) { CLEANUP_CYCLE } t = CacheCleanupThread.new(cleanup_interval, cleanup_cycle, self) do |t| until Thread.current[:should_exit] do self.sleepy_run end end at_exit { t[:should_exit] = true } end