Class: Shoryuken::Manager
- Inherits:
-
Object
- Object
- Shoryuken::Manager
- Includes:
- Util
- Defined in:
- lib/shoryuken/manager.rb
Constant Summary collapse
- BATCH_LIMIT =
10
- MIN_DISPATCH_INTERVAL =
0.1
Instance Method Summary collapse
-
#initialize(fetcher, polling_strategy, concurrency, executor) ⇒ Manager
constructor
A new instance of Manager.
- #start ⇒ Object
Methods included from Util
#elapsed, #fire_event, #logger, #unparse_queues, #worker_name
Constructor Details
#initialize(fetcher, polling_strategy, concurrency, executor) ⇒ Manager
Returns a new instance of Manager.
9 10 11 12 13 14 15 16 |
# File 'lib/shoryuken/manager.rb', line 9 def initialize(fetcher, polling_strategy, concurrency, executor) @fetcher = fetcher @polling_strategy = polling_strategy @max_processors = concurrency @busy_processors = Concurrent::AtomicFixnum.new(0) @executor = executor @running = Concurrent::AtomicBoolean.new(true) end |
Instance Method Details
#start ⇒ Object
18 19 20 |
# File 'lib/shoryuken/manager.rb', line 18 def start dispatch_loop end |