class Concurrent::Promises::RunFuturePromise

def initialize(delayed, blockers_count, default_executor, run_test)

def initialize(delayed, blockers_count, default_executor, run_test)
  super delayed, 1, Future.new(self, default_executor)
  @RunTest = run_test
end

def process_on_blocker_resolution(future, index)

def process_on_blocker_resolution(future, index)
  internal_state = future.internal_state
  unless internal_state.fulfilled?
    resolve_with internal_state
    return 0
  end
  value               = internal_state.value
  continuation_future = @RunTest.call value
  if continuation_future
    add_delayed_of continuation_future
    continuation_future.add_callback_notify_blocked self, nil
  else
    resolve_with internal_state
  end
  1
end