libp2p/utils/future

Search:
Group by:
Source   Edit  

Types

AllFuturesFailedError = object of CatchableError
Source   Edit  

Procs

proc allFuturesWaitOrTimeout[Fut](futs: seq[Fut]; timeout: Duration): InternalRaisesFuture[
    void, (CancelledError,)] {....stackTrace: false, raises: [], gcsafe, raises: [].}
Source   Edit  
proc anyCompleted[T](futs: seq[T]): InternalRaisesFuture[T,
    (AllFuturesFailedError, CancelledError)] {....stackTrace: false, raises: [],
    gcsafe, raises: [].}
Returns a future that will complete with the first future that completes. If all futures fail or futs is empty, the returned future will fail with AllFuturesFailedError. Source   Edit  

Templates

template cancelAndWait[T](futs: seq[T]): auto {..}
Source   Edit  
template cancelSoon[T](futs: seq[T]) {..}
Source   Edit  
template newFutureCompleted[T](): auto {..}
Source   Edit