Method: Async::Task.current
- Defined in:
- lib/async/task.rb
.current ⇒ Async::Task
Lookup the Async::Task for the current fiber. Raise ‘RuntimeError` if none is available.
191 192 193 |
# File 'lib/async/task.rb', line 191 def self.current Thread.current[:async_task] or raise RuntimeError, "No async task available!" end |