class Dry::Effects::Providers::Async
Attributes
stack[R]
Public Instance Methods
async(block)
click to toggle source
# File lib/dry/effects/providers/async.rb, line 16 def async(block) @tasks[block] = block end
await(task)
click to toggle source
# File lib/dry/effects/providers/async.rb, line 20 def await(task) Frame.spawn_fiber(stack, &@tasks.delete(task)) end
call()
click to toggle source
Yield the block with the handler installed
@api private
Calls superclass method
# File lib/dry/effects/providers/async.rb, line 27 def call @stack = Frame.stack super nil end