Method: Hermann::Result#value

Defined in:
lib/hermann/result.rb

#value(timeout = 0) ⇒ NilClass, Object

Access the value of the future

Parameters:

  • timeout (FixNum) (defaults to: 0)

    Seconds to wait on the underlying machinery for a result

Returns:

  • (NilClass)

    nil if no value could be received in the time alotted

  • (Object)


37
38
39
40
# File 'lib/hermann/result.rb', line 37

def value(timeout=0)
  @producer.tick_reactor(timeout)
  return @value
end