CompletableFuture.OrTimeout(Int64, TimeUnit) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Exceptionally completes this CompletableFuture with
a TimeoutException if not otherwise completed
before the given timeout.
[Android.Runtime.Register("orTimeout", "(JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/CompletableFuture;", "GetOrTimeout_JLjava_util_concurrent_TimeUnit_Handler", ApiSince=31)]
public virtual Java.Util.Concurrent.ICompletionStage? OrTimeout(long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("orTimeout", "(JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/CompletableFuture;", "GetOrTimeout_JLjava_util_concurrent_TimeUnit_Handler", ApiSince=31)>]
abstract member OrTimeout : int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.ICompletionStage
override this.OrTimeout : int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.ICompletionStage
Parameters
- timeout
- Int64
how long to wait before completing exceptionally
with a TimeoutException, in units of unit
- unit
- TimeUnit
a TimeUnit determining how to interpret the
timeout parameter
Returns
this CompletableFuture
- Attributes
Remarks
Exceptionally completes this CompletableFuture with a TimeoutException if not otherwise completed before the given timeout.
Added in 9.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.