class Contender::Future

@abstract

Public Instance Methods

cancel(should_interrupt) click to toggle source

@abstract @param [Boolean] should_interrupt @return [Boolean] True if this future was cancelled

# File lib/contender/future.rb, line 7
def cancel(should_interrupt)
  raise NotImplementedError
end
cancelled?() click to toggle source

Returns true if this future was cancelled before it could complete

@abstract @return [Boolean]

# File lib/contender/future.rb, line 15
def cancelled?
  raise NotImplementedError
end
done?() click to toggle source

Returns true if this future was either cancelled or completed

@abstract @return [Boolean]

# File lib/contender/future.rb, line 23
def done?
  raise NotImplementedError
end
result(timeout = nil) click to toggle source

@abstract @raise [ExecutionError] If the result of the operation was an exception @raise [TimeoutError] If the timeout was reached before the operation completed @raise [CancellationError] If the operation was cancelled @param [Integer] timeout Time to wait for the result @return [Object] The result of the future

# File lib/contender/future.rb, line 33
def result(timeout = nil)
  raise NotImplementedError
end