| Class | Merb::BootLoader::ReloadClasses::TimedExecutor |
| In: |
merb-core/lib/merb-core/bootloader.rb
|
| Parent: | Object |
Executes the associated block every @seconds@ seconds in a separate thread.
| seconds<Integer>: | Number of seconds to sleep in between runs of &block. |
| &block: | The block to execute periodically. |
| Thread: | The thread executing the block periodically. |
:api: private
# File merb-core/lib/merb-core/bootloader.rb, line 1323
1323: def self.every(seconds, &block)
1324: Thread.new do
1325: loop do
1326: sleep( seconds )
1327: yield
1328: end
1329: Thread.exit
1330: end
1331: end