Class: Smith::Workflow::Parallel::RootExecution

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Defined in:
lib/smith/workflow/parallel/root_execution.rb

Instance Method Summary collapse

Instance Method Details

#callObject



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/smith/workflow/parallel/root_execution.rb', line 14

def call
  Thread.handle_interrupt(Object => :never) do
    prepare
    values = Thread.handle_interrupt(Object => :immediate) { resolve(@futures) }
    @completed = true
    values
  rescue Exception => e # rubocop:disable Lint/RescueException
    @signal&.cancel!(e)
    raise
  ensure
    cleanup
  end
end