Class AsyncThreadService
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.util.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 voidinitialize()See https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool--static voidshutdown()shutdown the internal thread service.static <T> Future<T>submit(Callable<T> task)internal submit function.
-