Removed unused IThreadPool

This commit is contained in:
dankito 2023-07-06 17:31:13 +02:00
parent c8a7731ccc
commit 02bbdb0453
2 changed files with 0 additions and 32 deletions

View File

@ -1,10 +0,0 @@
package net.dankito.banking.fints.util
interface IThreadPool {
fun runAsync(runnable: () -> Unit)
fun shutDown()
}

View File

@ -1,22 +0,0 @@
package net.dankito.banking.fints.util
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
open class JavaThreadPool : IThreadPool {
protected val threadPool: ExecutorService = Executors.newCachedThreadPool()
override fun runAsync(runnable: () -> Unit) {
threadPool.execute(runnable)
}
override fun shutDown() {
if (threadPool.isShutdown == false) {
threadPool.shutdownNow()
}
}
}