Class AsyncThreadService
- java.lang.Object
-
- com.azure.android.ai.vision.common.implementation.AsyncThreadService
-
public class AsyncThreadService extends Object
Internal AsyncThreadService class, which wraps Java ExecutorService as static and shared between all SDK instances who needs to do async operations. Shutdown needs to be called to ensure resource release after service is not needed. According to Java documentation, by using newCachedThreadPool, ExecuteService will release the thread pool after 60 seconds if there is no active threads.
-
-
Constructor Summary
Constructors Constructor Description AsyncThreadService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
initialize()
static void
shutdown()
static <T> Future<T>
submit(Callable<T> task)
static <T> CompletableFuture<T>
submitCompletable(Callable<T> task)
-
-
-
Method Detail
-
initialize
public static void initialize()
-
shutdown
public static void shutdown()
-
submitCompletable
public static <T> CompletableFuture<T> submitCompletable(Callable<T> task)
-
-