File tree Expand file tree Collapse file tree 4 files changed +8
-2
lines changed
kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -82,4 +82,6 @@ object CommonPool : CoroutineDispatcher() {
8282 }
8383 usePrivatePool = false
8484 }
85+
86+ override fun toString (): String = " CommonPool"
8587}
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ internal fun resetCoroutineId() {
4848public object Unconfined : CoroutineDispatcher() {
4949 override fun isDispatchNeeded (context : CoroutineContext ): Boolean = false
5050 override fun dispatch (context : CoroutineContext , block : Runnable ) { throw UnsupportedOperationException () }
51+ override fun toString (): String = " Unconfined"
5152}
5253
5354/* *
Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ public abstract class CoroutineDispatcher :
9191 " The dispatcher to the right of `+` just replaces the dispatcher the left of `+`." ,
9292 level = DeprecationLevel .ERROR )
9393 public operator fun plus (other : CoroutineDispatcher ) = other
94+
95+ // for nicer debugging
96+ override fun toString (): String =
97+ " ${this ::class .java.simpleName} @${Integer .toHexString(System .identityHashCode(this ))} "
98+
9499}
95100
96101internal class DispatchedContinuation <in T >(
Original file line number Diff line number Diff line change @@ -128,8 +128,6 @@ internal class EventLoopImpl(
128128 }
129129 }
130130
131- override fun toString (): String = " EventLoopImpl@${Integer .toHexString(System .identityHashCode(this ))} "
132-
133131 private fun scheduleQueued (queuedTask : QueuedTask ): Boolean {
134132 if (parentJob == null ) {
135133 queue.addLast(queuedTask)
You can’t perform that action at this time.
0 commit comments