class Concurrent::Edge::AbstractPromise

@abstract @!visibility private

Public Class Methods

new(future) click to toggle source
Calls superclass method
# File lib/concurrent/edge/future.rb, line 910
def initialize(future)
  super()
  @Future = future
end

Public Instance Methods

default_executor() click to toggle source
# File lib/concurrent/edge/future.rb, line 921
def default_executor
  future.default_executor
end
evaluate_to(*args, block) click to toggle source

@return [Future]

# File lib/concurrent/edge/future.rb, line 947
def evaluate_to(*args, block)
  complete_with Future::Success.new(block.call(*args))
rescue StandardError => error
  complete_with Future::Failed.new(error)
rescue Exception => error
  log(ERROR, 'Edge::Future', error)
  complete_with Future::Failed.new(error)
end
event()
Alias for: future
future() click to toggle source
# File lib/concurrent/edge/future.rb, line 915
def future
  @Future
end
Also aliased as: event
inspect() click to toggle source
# File lib/concurrent/edge/future.rb, line 936
def inspect
  to_s
end
state() click to toggle source
# File lib/concurrent/edge/future.rb, line 925
def state
  future.state
end
to_s() click to toggle source
# File lib/concurrent/edge/future.rb, line 932
def to_s
  "<##{self.class}:0x#{'%x' % (object_id << 1)} #{state}>"
end
touch() click to toggle source
# File lib/concurrent/edge/future.rb, line 929
def touch
end

Private Instance Methods

complete_with(new_state, raise_on_reassign = true) click to toggle source
# File lib/concurrent/edge/future.rb, line 942
def complete_with(new_state, raise_on_reassign = true)
  @Future.complete_with(new_state, raise_on_reassign)
end