Compartilhar via


AsyncTask.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.

Get()

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

[Android.Runtime.Register("get", "()Ljava/lang/Object;", "")]
public Java.Lang.Object? Get ();
[<Android.Runtime.Register("get", "()Ljava/lang/Object;", "")>]
member this.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 android.os.AsyncTask.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.

[Android.Runtime.Register("get", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "")]
public Java.Lang.Object? Get (long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("get", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "")>]
member this.Get : int64 * Java.Util.Concurrent.TimeUnit -> Java.Lang.Object

Parameters

timeout
Int64

Time to wait before cancelling the operation.

unit
TimeUnit

The time unit for the timeout.

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.

Java documentation for android.os.AsyncTask.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