Flowdock
method

spawn_thread

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: Reaper
spawn_thread(frequency) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 334
            def spawn_thread(frequency)
              Thread.new(frequency) do |t|
                loop do
                  sleep t
                  @mutex.synchronize do
                    @pools[frequency].select!(&:weakref_alive?)
                    @pools[frequency].each do |p|
                      p.reap
                      p.flush
                    rescue WeakRef::RefError
                    end
                  end
                end
              end
            end
Register or log in to add new notes.