Method: Async::Task#async
- Defined in:
- lib/async/task.rb
#async(*arguments, **options, &block) ⇒ Object
Run an asynchronous task as a child of the current task.
188 189 190 191 192 193 194 195 196 |
# File 'lib/async/task.rb', line 188 def async(*arguments, **, &block) raise FinishedError if self.finished? task = Task.new(self, **, &block) task.run(*arguments) return task end |