Class: Merb::BootLoader::ReloadClasses::TimedExecutor

Inherits:
Object
  • Object
show all
Defined in:
lib/merb-core/bootloader.rb

Class Method Summary collapse

Class Method Details

.every(seconds, &block) ⇒ Object



660
661
662
663
664
665
666
667
668
669
# File 'lib/merb-core/bootloader.rb', line 660

def self.every(seconds, &block)
  Thread.abort_on_exception = true
  Thread.new do
    loop do
      sleep( seconds )
      block.call
    end
    Thread.exit
  end
end