Class: Infrastruct::Manager
- Inherits:
-
Object
- Object
- Infrastruct::Manager
- Defined in:
- lib/infrastruct/manager.rb
Instance Attribute Summary collapse
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
Instance Method Summary collapse
- #enqueue(*args) ⇒ Object
-
#initialize(thread_pool) ⇒ Manager
constructor
A new instance of Manager.
- #result ⇒ Object
Constructor Details
#initialize(thread_pool) ⇒ Manager
Returns a new instance of Manager.
5 6 7 8 9 |
# File 'lib/infrastruct/manager.rb', line 5 def initialize(thread_pool) @thread_pool = thread_pool @thread_pool.run end |
Instance Attribute Details
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
3 4 5 |
# File 'lib/infrastruct/manager.rb', line 3 def queue @queue end |
Instance Method Details
#enqueue(*args) ⇒ Object
11 12 13 |
# File 'lib/infrastruct/manager.rb', line 11 def enqueue(*args) @thread_pool.enqueue(args) end |
#result ⇒ Object
15 16 17 |
# File 'lib/infrastruct/manager.rb', line 15 def result @thread_pool.finalize end |