class ThreadExecutor::Future

Proxies access to a Future object.

This protects the user from doing the “wrong thing” with a Promise.

Public Class Methods

new(promise) click to toggle source
# File lib/thread_executor/future.rb, line 36
def initialize(promise)
  @promise = promise
end

Public Instance Methods

value() click to toggle source

Block until a value is ready.

If an Exception was raised instead of producing a value it is rethrown.

This call is proxied to Promise#value.

# File lib/thread_executor/future.rb, line 46
def value
  @promise.value
end