class Concurrent::Promises::ChainPromise

Private Instance Methods

on_resolvable(resolved_future, index) click to toggle source
# File lib/concurrent-ruby/concurrent/promises.rb, line 1758
def on_resolvable(resolved_future, index)
  if Future === resolved_future
    Concurrent.executor(@Executor).post(resolved_future, @Args, @Task) do |future, args, task|
      evaluate_to(*future.result, *args, task)
    end
  else
    Concurrent.executor(@Executor).post(@Args, @Task) do |args, task|
      evaluate_to(*args, task)
    end
  end
end