|
|
@ -4,9 +4,9 @@ import java.util.concurrent.ExecutorService |
|
|
|
import java.util.concurrent.Executors |
|
|
|
import java.util.concurrent.Executors |
|
|
|
|
|
|
|
|
|
|
|
object ThreadPoolUtil { |
|
|
|
object ThreadPoolUtil { |
|
|
|
|
|
|
|
private val executor = Executors.newSingleThreadExecutor() |
|
|
|
|
|
|
|
|
|
|
|
fun executeSingleThreadPool(runnable: Runnable): ExecutorService { |
|
|
|
fun executeSingleThreadPool(runnable: Runnable): ExecutorService { |
|
|
|
val executor = Executors.newSingleThreadExecutor() |
|
|
|
|
|
|
|
executor.submit(runnable) |
|
|
|
executor.submit(runnable) |
|
|
|
return executor |
|
|
|
return executor |
|
|
|
} |
|
|
|
} |
|
|
|