Open
Description
import kotlinx.coroutines.*
import kotlin.coroutines.*
object MyDispatcher: CoroutineDispatcher() {
override fun dispatch(context: CoroutineContext, block: Runnable) {
println(context)
block.run()
}
}
fun main() {
val newDispatcher = MyDispatcher.limitedParallelism(2)
newDispatcher.dispatch(CoroutineName("Hi!"), Runnable { })
}
prints
LimitedDispatcher@4459eb14
No CoroutineName
in sight.
This bug was not reported to us as any production issue, but was found accidentally by reading