Class: Zold::Endless
- Inherits:
-
Object
- Object
- Zold::Endless
- Defined in:
- lib/zold/endless.rb
Overview
Endless loop
Instance Method Summary collapse
-
#initialize(title, log: Log::NULL) ⇒ Endless
constructor
A new instance of Endless.
- #run ⇒ Object
Constructor Details
Instance Method Details
#run ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/zold/endless.rb', line 39 def run start = Time.now Thread.current.name = @title begin loop do VerboseThread.new(@log).run(true) do yield end end ensure @log.debug("Endless loop \"#{@title}\" quit after #{Age.new(start)} of work") end end |