module Fear::Await

You're strongly discouraged to use this module since it may lead to deadlocks, and reduced performance. Although, blocking may be useful in some cases (e.g. in tests)

@see stackoverflow.com/questions/38155159/why-doesnt-scalas-future-have-a-get-getmaxduration-method-forcing-us-to

Public Instance Methods

ready(awaitable, at_most) click to toggle source

Blocks until Fear::Awaitable reached completed state and returns itself or raises TimeoutError

@param awaitable [Fear::Awaitable] @param at_most [Fixnum] timeout in seconds @return [Fear::Awaitable] @raise [Timeout::Error]

# File lib/fear/await.rb, line 17
                def ready(awaitable, at_most)
  awaitable.__ready__(at_most)
end
result(awaitable, at_most) click to toggle source

Blocks until Fear::Awaitable reached completed state and returns its value or raises TimeoutError

@param awaitable [Fear::Awaitable] @param at_most [Fixnum] timeout in seconds @return [any] @raise [Timeout::Error]

# File lib/fear/await.rb, line 29
                def result(awaitable, at_most)
  awaitable.__result__(at_most)
end