class Merb::BootLoader::ReloadClasses::TimedExecutor
Public Class Methods
every(seconds) { || ... }
click to toggle source
Executes the associated block every @seconds@ seconds in a separate thread.
Parameters¶ ↑
- seconds<Integer>
-
Number of seconds to sleep in between runs of &block.
- &block
-
The block to execute periodically.
Returns¶ ↑
- Thread
-
The thread executing the block periodically.
:api: private
# File lib/merb-core/bootloader.rb, line 1373 def self.every(seconds, &block) Thread.new do loop do sleep( seconds ) yield end Thread.exit end end