Removed unused IThreadPool
This commit is contained in:
parent
c8a7731ccc
commit
02bbdb0453
|
@ -1,10 +0,0 @@
|
|||
package net.dankito.banking.fints.util
|
||||
|
||||
|
||||
interface IThreadPool {
|
||||
|
||||
fun runAsync(runnable: () -> Unit)
|
||||
|
||||
fun shutDown()
|
||||
|
||||
}
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue