Skip to content

Commit 143ec32

Browse files
committed
Reduce IO worker thread count
1 parent 4e38265 commit 143ec32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/one/oktw/galaxy/util/KotlinCoroutineTaskExecutor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import java.util.concurrent.atomic.AtomicInteger
2929
class KotlinCoroutineTaskExecutor(queueCount: Int, name: String) : PrioritizedConsecutiveExecutor(queueCount, null, name), CoroutineScope {
3030
companion object {
3131
private var index = 0
32-
private val dispatcher = Executors.newFixedThreadPool(16) { r -> Thread(r, "IO-Kotlin-${index++}").apply { isDaemon = true } }.asCoroutineDispatcher()
32+
private val dispatcher = Executors.newFixedThreadPool(8) { r -> Thread(r, "IO-Kotlin-${index++}").apply { isDaemon = true } }.asCoroutineDispatcher()
3333
}
3434

3535
private val job = SupervisorJob()

0 commit comments

Comments
 (0)