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() {
82
82
}
83
83
usePrivatePool = false
84
84
}
85
+
86
+ override fun toString (): String = " CommonPool"
85
87
}
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ internal fun resetCoroutineId() {
48
48
public object Unconfined : CoroutineDispatcher() {
49
49
override fun isDispatchNeeded (context : CoroutineContext ): Boolean = false
50
50
override fun dispatch (context : CoroutineContext , block : Runnable ) { throw UnsupportedOperationException () }
51
+ override fun toString (): String = " Unconfined"
51
52
}
52
53
53
54
/* *
Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ public abstract class CoroutineDispatcher :
91
91
" The dispatcher to the right of `+` just replaces the dispatcher the left of `+`." ,
92
92
level = DeprecationLevel .ERROR )
93
93
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
+
94
99
}
95
100
96
101
internal class DispatchedContinuation <in T >(
Original file line number Diff line number Diff line change @@ -128,8 +128,6 @@ internal class EventLoopImpl(
128
128
}
129
129
}
130
130
131
- override fun toString (): String = " EventLoopImpl@${Integer .toHexString(System .identityHashCode(this ))} "
132
-
133
131
private fun scheduleQueued (queuedTask : QueuedTask ): Boolean {
134
132
if (parentJob == null ) {
135
133
queue.addLast(queuedTask)
You can’t perform that action at this time.
0 commit comments