Share via


ForkJoinTask.AdaptInterruptible(ICallable) Method

Definition

Returns a new ForkJoinTask that performs the call method of the given Callable as its action, and returns its result upon #join, translating any checked exceptions encountered into RuntimeException.

[Android.Runtime.Register("adaptInterruptible", "(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/ForkJoinTask;", "", ApiSince=36)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.Concurrent.ForkJoinTask? AdaptInterruptible(Java.Util.Concurrent.ICallable? callable);
[<Android.Runtime.Register("adaptInterruptible", "(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/ForkJoinTask;", "", ApiSince=36)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member AdaptInterruptible : Java.Util.Concurrent.ICallable -> Java.Util.Concurrent.ForkJoinTask

Parameters

callable
ICallable

the callable action

Returns

the task

Attributes

Remarks

Returns a new ForkJoinTask that performs the call method of the given Callable as its action, and returns its result upon #join, translating any checked exceptions encountered into RuntimeException. Additionally, invocations of cancel with mayInterruptIfRunning true will attempt to interrupt the thread performing the task.

Added in 19.

Java documentation for java.util.concurrent.ForkJoinTask.adaptInterruptible(java.util.concurrent.Callable<? extends T>).

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