Class: Concurrent::ImmediateExecutor
- Inherits:
-
Object
- Object
- Concurrent::ImmediateExecutor
- Includes:
- Executor
- Defined in:
- lib/concurrent/executor/immediate_executor.rb
Instance Method Summary collapse
Methods included from Executor
Instance Method Details
#<<(task) ⇒ Object
11 12 13 14 |
# File 'lib/concurrent/executor/immediate_executor.rb', line 11 def <<(task) post(&task) self end |
#post(*args, &task) ⇒ Object
5 6 7 8 9 |
# File 'lib/concurrent/executor/immediate_executor.rb', line 5 def post(*args, &task) raise ArgumentError.new('no block given') unless block_given? task.call(*args) true end |