chronos/internal/asyncmacro

Source   Edit  

Macros

macro async(params, prc: untyped): untyped
Macro which processes async procedures into the appropriate iterators and yield statements. Source   Edit  
macro async(prc: untyped): untyped
Macro which processes async procedures into the appropriate iterators and yield statements. Source   Edit  

Templates

template await[T, E](fut: InternalRaisesFuture[T, E]): T

Ensure that the given Future is finished, then return its value.

If the Future failed or was cancelled, the corresponding exception will be raised instead.

If the Future is pending, execution of the current async procedure will be suspended until the Future is finished.

Source   Edit  
template await[T](f: Future[T]): T

Ensure that the given Future is finished, then return its value.

If the Future failed or was cancelled, the corresponding exception will be raised instead.

If the Future is pending, execution of the current async procedure will be suspended until the Future is finished.

Source   Edit  
template awaitne[T](f: Future[T]): Future[T]
Source   Edit