From 02bbdb0453f0f1773b0b6fa34ddfe8aa29688397 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 6 Jul 2023 17:31:13 +0200 Subject: [PATCH] Removed unused IThreadPool --- .../dankito/banking/fints/util/IThreadPool.kt | 10 --------- .../banking/fints/util/JavaThreadPool.kt | 22 ------------------- 2 files changed, 32 deletions(-) delete mode 100644 fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/IThreadPool.kt delete mode 100644 fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/util/JavaThreadPool.kt diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/IThreadPool.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/IThreadPool.kt deleted file mode 100644 index 41f22d81..00000000 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/IThreadPool.kt +++ /dev/null @@ -1,10 +0,0 @@ -package net.dankito.banking.fints.util - - -interface IThreadPool { - - fun runAsync(runnable: () -> Unit) - - fun shutDown() - -} \ No newline at end of file diff --git a/fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/util/JavaThreadPool.kt b/fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/util/JavaThreadPool.kt deleted file mode 100644 index 07e46c30..00000000 --- a/fints4k/src/jvmMain/kotlin/net/dankito/banking/fints/util/JavaThreadPool.kt +++ /dev/null @@ -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() - } - } - -} \ No newline at end of file