Class: Charming::TaskExecutor::Inline
- Inherits:
-
Object
- Object
- Charming::TaskExecutor::Inline
- Defined in:
- lib/charming/task_executor.rb
Instance Method Summary collapse
-
#initialize(queue) ⇒ Inline
constructor
A new instance of Inline.
- #shutdown(timeout: 0.0) ⇒ Object
- #submit(name, &block) ⇒ Object
Constructor Details
#initialize(queue) ⇒ Inline
Returns a new instance of Inline.
40 41 42 |
# File 'lib/charming/task_executor.rb', line 40 def initialize(queue) @queue = queue end |
Instance Method Details
#shutdown(timeout: 0.0) ⇒ Object
50 51 |
# File 'lib/charming/task_executor.rb', line 50 def shutdown(timeout: 0.0) end |
#submit(name, &block) ⇒ Object
44 45 46 47 48 |
# File 'lib/charming/task_executor.rb', line 44 def submit(name, &block) task = Task.new(name: name.to_sym, block: block) @queue << run(task) nil end |