module AwaitAsync::Helper
Extended Modules
Defined in:
await_async/helper.crInstance Method Summary
-
#await(timeout : Time::Span, futures : Enumerable(MiniFuture(T))) forall T
Iterate through all the future and await for them.
-
#await(timeout : Time::Span, future : MiniFuture)
Await a future to resolve, or throw
MiniFuture::TimeoutException
otherwise. -
#await(futures : Enumerable(MiniFuture(T))) forall T
Iterate through all the future and await for them.
-
#await(future : MiniFuture)
Await a future to resolve.
Macro Summary
-
async(method)
Ask Crystal to run this method asynchronously in its own fiber.
- async(&block)
-
async!(method)
Ask Crystal to run this method asynchronously in its own fiber.
- async!(&block)
Instance Method Detail
def await(timeout : Time::Span, futures : Enumerable(MiniFuture(T))) forall T
#
Iterate through all the future and await for them.
def await(timeout : Time::Span, future : MiniFuture)
#
Await a future to resolve, or throw MiniFuture::TimeoutException
otherwise.
def await(futures : Enumerable(MiniFuture(T))) forall T
#
Iterate through all the future and await for them.
Macro Detail
macro async(method)
#
Ask Crystal to run this method asynchronously in its own fiber.
NOTE The fiber won't be started after creation.