Skip to content

Commit 74cc385

Browse files
committed
chore: virtual thread dispatcher
1 parent 32ca3cb commit 74cc385

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

common/src/jvmMain/kotlin/dev/suresh/Platform.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ import kotlinx.coroutines.asCoroutineDispatcher
77
actual val platform: String = "JVM"
88

99
/** A coroutine dispatcher that executes tasks on Virtual Threads. */
10-
val Dispatchers.VT
11-
get() = Executors.newVirtualThreadPerTaskExecutor().asCoroutineDispatcher()
10+
val Dispatchers.VT by lazy { Executors.newVirtualThreadPerTaskExecutor().asCoroutineDispatcher() }

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ kotlinx-html = "0.9.1"
3333
kotlinx-benchmark = "0.4.9"
3434
kotlinx-reflect-lite = "1.1.0"
3535
kotlinx-bincompat = "0.13.2"
36-
kotlin-wrappers = "1.0.0-pre.619"
36+
kotlin-wrappers = "1.0.0-pre.620"
3737
zip-prefixer = "0.3.1"
3838
ajalt-mordant = "2.1.0"
3939
ajalt-clikt = "4.1.0"

0 commit comments

Comments
 (0)