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.

Raises:



188
189
190
191
192
193
194
195
196
# File 'lib/async/task.rb', line 188

def async(*arguments, **options, &block)
	raise FinishedError if self.finished?
	
	task = Task.new(self, **options, &block)
	
	task.run(*arguments)
	
	return task
end