-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
Use case
We have specific dispatchers, and in coroutine dumps they all look like LimitedDispatcher@xxxxxxxx, and it's not immediately clear where the dispatcher comes from.
The Shape of the API
Make kotlinx.coroutines.CoroutineDispatcher.limitedParallelism accept debugName: String?.
Alternatively, make an extension function fun CoroutineDispatcher.namedDispatcher(debugName: String): CoroutineDispatcher which will return a dispatcher, which delegates to this and has its toString overridden. It can return this as is when debug is off.
Prior Art
kotlinx.coroutines.scheduling.LimitingDispatcher has name.
vsalavatov