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



677
678
679
680
681
682
683
684
685
686
# File 'lib/merb-core/bootloader.rb', line 677

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