Parent

Methods

Class/Module Index [+]

Quicksearch

Merb::BootLoader::ReloadClasses::TimedExecutor

Public Class Methods

every(seconds, &block) 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.