Package me.saro.kit
Class Threads
java.lang.Object
me.saro.kit.Threads
public class Threads
extends java.lang.Object
thread util
- Since:
- 1.0.0
- Author:
- PARK Yong Seo
-
Constructor Summary
Constructors Constructor Description Threads() -
Method Summary
Modifier and Type Method Description static <T, R> java.util.List<R>executeAllThreads(int nThreads, java.util.List<T> list, ThrowableFunction<T,R> map)execute all threadsstatic <T, R> java.util.List<R>executeAllThreads(java.util.concurrent.ExecutorService executorService, java.util.List<T> list, ThrowableFunction<T,R> map)execute all threads WARNING : this method does not shutdown to ExecutorService instancestatic voidkill(java.lang.Thread thread)kill thread without exception
-
Constructor Details
-
Threads
public Threads()
-
-
Method Details
-
executeAllThreads
public static <T, R> java.util.List<R> executeAllThreads(java.util.concurrent.ExecutorService executorService, java.util.List<T> list, ThrowableFunction<T,R> map)execute all threads WARNING : this method does not shutdown to ExecutorService instance- Parameters:
executorService-list-map-- Returns:
- map result list
-
executeAllThreads
public static <T, R> java.util.List<R> executeAllThreads(int nThreads, java.util.List<T> list, ThrowableFunction<T,R> map)execute all threads- Parameters:
nThreads-list-map-- Returns:
- map result list
-
kill
public static void kill(java.lang.Thread thread)kill thread without exception- Parameters:
thread-
-