TmuxWait.UntilAsync
Waits until a probe reports the state was reached.
Source and package
- Module
- LibTmux
- Declared in
- TmuxWait
- Package
- LibTmux
- Source
- src/LibTmux/Waiting/TmuxWait.cs
- UntilAsync ( probe : Func<Cancellation
Token , Task<bool>> , timeout : TimeSpan , interval : TimeSpan , throwOnTimeout : bool , cancellationToken : CancellationToken ) Task<bool> ( probe : Func<CancellationToken , Task<T>> , predicate : Func<T, bool> , timeout : TimeSpan , interval : TimeSpan , cancellationToken : CancellationToken ) Task<T> -
- Parameters
-
-
probe ( Func<Cancellation
Token , Task<bool>> ) – Answers whether the state has been reached. (forUntilAsync(probe, timeout, interval, throwOnTimeout, cancellationToken)) -
timeout ( Time
Span ) – How long to keep asking. (forUntilAsync(probe, timeout, interval, throwOnTimeout, cancellationToken)) -
interval ( Time
Span ) – How long to wait between askings. (forUntilAsync(probe, timeout, interval, throwOnTimeout, cancellationToken)) -
throwOnTimeout ( bool ) – Whether running out is a failure. (for
UntilAsync(probe, timeout, interval, throwOnTimeout, cancellationToken)) -
cancellationToken ( Cancellation
Token ) – Cancels the wait. -
probe ( Func<Cancellation
Token , Task<T>> ) – Reads the current value. (forUntilAsync(probe, predicate, timeout, interval, cancellationToken)) -
predicate ( Func<T, bool> ) – Answers whether a reading is the wanted one. (for
UntilAsync(probe, predicate, timeout, interval, cancellationToken)) -
timeout ( Time
Span ) – How long to keep reading. (forUntilAsync(probe, predicate, timeout, interval, cancellationToken)) -
interval ( Time
Span ) – How long to wait between readings. (forUntilAsync(probe, predicate, timeout, interval, cancellationToken))
-
- Returns
-
True when the state was reached. (for
UntilAsync(probe, timeout, interval, throwOnTimeout, cancellationToken))The first reading the predicate accepted. (for
UntilAsync(probe, predicate, timeout, interval, cancellationToken)) - Raises
-
-
Tmux
Wait – The state was not reached and running out was to be a failure. (forTimeout Exception UntilAsync(probe, timeout, interval, throwOnTimeout, cancellationToken)) -
Tmux
Wait – No reading was accepted in time. (forTimeout Exception UntilAsync(probe, predicate, timeout, interval, cancellationToken))
-
Discussed in Waiting and retrying