Class: RosettaQueue::ThreadedManager

Inherits:
BaseManager show all
Defined in:
lib/rosetta_queue/consumer_managers/threaded.rb

Instance Attribute Summary

Attributes inherited from BaseManager

#consumers

Instance Method Summary collapse

Methods inherited from BaseManager

#add, create

Constructor Details

#initializeThreadedManager

Returns a new instance of ThreadedManager.



6
7
8
9
10
11
# File 'lib/rosetta_queue/consumer_managers/threaded.rb', line 6

def initialize
  @threads    = {}
  @running    = true
  @processing = true
  super
end

Instance Method Details

#startObject



13
14
15
16
17
# File 'lib/rosetta_queue/consumer_managers/threaded.rb', line 13

def start
  start_threads
  join_threads
  monitor_threads
end

#stopObject



19
20
21
# File 'lib/rosetta_queue/consumer_managers/threaded.rb', line 19

def stop
  stop_threads
end