Class: Rack::ESI::Worker

Inherits:
Thread
  • Object
show all
Defined in:
lib/rack-esi/threaded.rb

Instance Method Summary collapse

Constructor Details

#initialize(queue) ⇒ Worker

Returns a new instance of Worker



23
24
25
26
27
28
29
30
31
# File 'lib/rack-esi/threaded.rb', line 23

def initialize(queue)
  super do
    begin
      queue.pop[ self ]
    rescue => e
      puts e
    end until key? :finish
  end
end