Skip to content

Commit 75ae6e5

Browse files
committed
Use default dispatcher for hiccup coroutine, see Kotlin/kotlinx.coroutines#840
1 parent 786b8de commit 75ae6e5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package dev.evo.prometheus.hiccup
22

3-
import kotlinx.coroutines.newSingleThreadContext
3+
import kotlinx.coroutines.Dispatchers
44
import kotlin.coroutines.CoroutineContext
55

6-
// FIXME: Dispatchers.Default consumes too much CPU with tight delay
6+
// TODO: Check high CPU consumption
77
// See https://github.com/Kotlin/kotlinx.coroutines/issues/840
8-
@UseExperimental(kotlinx.coroutines.ObsoleteCoroutinesApi::class)
9-
actual val hiccupCoroutineContext: CoroutineContext = newSingleThreadContext("hiccup-thread")
8+
actual val hiccupCoroutineContext: CoroutineContext = Dispatchers.Default

0 commit comments

Comments
 (0)