Retry.ifNotSent
LibTmux.FSharp Runs an operation, and again up to <c>retries</c> times while nothing it sent reached tmux.
Source and package
- Module
- LibTmux.FSharp
- Declared in
- Retry
- Package
- LibTmux.FSharp
- Source
- src/LibTmux.FSharp/Library.fsi
- F# value signatures Declares the name and type of a value or function in a signature. Language documentation ifNotSent: cancellationToken: Cancellation
Token -> retries: int -> operation: (CancellationToken -> Task<'T>) -> Task<'T> -
Description#
An attempt is repeated only when it fails with <c>NotSent</c> and no command it sent before that failure reached tmux, counting every command the operation awaits, including through nested retries. An operation of several steps whose first step ran is therefore not repeated because a later step was refused before dispatch. Any other failure, and cancellation, propagates at once. A read that is safe to repeat whatever happened belongs in the caller's own retry policy.
- Parameters
-
-
cancellationToken ( Cancellation
Token ) -
retries ( int )
-
operation ( (Cancellation
Token -> Task<'T>) )
-
- Raises
-
-
System
.Argument – The retry count is negative.Out Of Range Exception
-
Discussed in .NET interoperation