ForkJoinTask.AdaptInterruptible(ICallable) 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.
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.
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.