Method: Workling::Invokers::ThreadedPoller#initialize

Defined in:
lib/workling/invokers/threaded_poller.rb

#initialize(routing, client_class) ⇒ ThreadedPoller

Returns a new instance of ThreadedPoller.



12
13
14
15
16
17
18
19
20
# File 'lib/workling/invokers/threaded_poller.rb', line 12

def initialize(routing, client_class)
  super

  ThreadedPoller.sleep_time = Workling.config[:sleep_time] || 2
  ThreadedPoller.reset_time = Workling.config[:reset_time] || 30

  @workers = ThreadGroup.new
  @mutex = Mutex.new
end