class Concurrent::Promise
def ns_initialize(value, opts)
def ns_initialize(value, opts) super @executor = Options.executor_from_options(opts) || Concurrent.global_io_executor @args = get_arguments_from(opts) @parent = opts.fetch(:parent) { nil } @on_fulfill = opts.fetch(:on_fulfill) { Proc.new { |result| result } } @on_reject = opts.fetch(:on_reject) { Proc.new { |reason| raise reason } } @promise_body = opts[:__promise_body_from_block__] || Proc.new { |result| result } @state = :unscheduled @children = [] end