class Dry::Effects::Providers::Parallel
Attributes
stack[R]
Public Instance Methods
call() { || ... }
click to toggle source
Yield the block with the handler installed
@api private
# File lib/dry/effects/providers/parallel.rb, line 33 def call @stack = Frame.stack yield end
join(xs)
click to toggle source
# File lib/dry/effects/providers/parallel.rb, line 26 def join(xs) xs.map(&:value!) end
par()
click to toggle source
# File lib/dry/effects/providers/parallel.rb, line 17 def par stack = self.stack.dup proc do |&block| ::Concurrent::Promise.execute(executor: executor) do Frame.spawn_fiber(stack, &block) end end end