Freigeben über


IFuture.Get Method

Definition

Overloads

Get()

Waits if necessary for the computation to complete, and then retrieves its result.

Get(Int64, TimeUnit)

Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.

Get()

Waits if necessary for the computation to complete, and then retrieves its result.

[Android.Runtime.Register("get", "()Ljava/lang/Object;", "GetGetHandler:Java.Util.Concurrent.IFutureInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? Get ();
[<Android.Runtime.Register("get", "()Ljava/lang/Object;", "GetGetHandler:Java.Util.Concurrent.IFutureInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Get : unit -> Java.Lang.Object

Returns

the computed result

Attributes

Exceptions

if the computation was cancelled

if the computation threw an exception

if the current thread was interrupted while waiting

Remarks

Waits if necessary for the computation to complete, and then retrieves its result.

Java documentation for java.util.concurrent.Future.get().

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.

Applies to

Get(Int64, TimeUnit)

Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.

[Android.Runtime.Register("get", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "GetGet_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IFutureInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? Get (long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("get", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "GetGet_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IFutureInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Get : int64 * Java.Util.Concurrent.TimeUnit -> Java.Lang.Object

Parameters

timeout
Int64

the maximum time to wait

unit
TimeUnit

the time unit of the timeout argument

Returns

the computed result

Attributes

Exceptions

if the computation was cancelled

if the computation threw an exception

if the current thread was interrupted while waiting

if the wait timed out

Remarks

Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.

Java documentation for java.util.concurrent.Future.get(long, java.util.concurrent.TimeUnit).

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.

Applies to