@@ -43,7 +43,7 @@ class TestCoroutineContext(private val name: String? = null) : CoroutineContext
43
43
}
44
44
45
45
// The ordered queue for the runnable tasks.
46
- private val queue = ThreadSafeHeap <TimedRunnable >()
46
+ private val queue = ThreadSafeHeap <TimedRunnableObsolete >()
47
47
48
48
// The per-scheduler global order counter.
49
49
private var counter = 0L
@@ -184,10 +184,10 @@ class TestCoroutineContext(private val name: String? = null) : CoroutineContext
184
184
}
185
185
186
186
private fun enqueue (block : Runnable ) =
187
- queue.addLast(TimedRunnable (block, counter++ ))
187
+ queue.addLast(TimedRunnableObsolete (block, counter++ ))
188
188
189
189
private fun postDelayed (block : Runnable , delayTime : Long ) =
190
- TimedRunnable (block, counter++ , time + TimeUnit .MILLISECONDS .toNanos(delayTime))
190
+ TimedRunnableObsolete (block, counter++ , time + TimeUnit .MILLISECONDS .toNanos(delayTime))
191
191
.also {
192
192
queue.addLast(it)
193
193
}
@@ -245,17 +245,17 @@ class TestCoroutineContext(private val name: String? = null) : CoroutineContext
245
245
}
246
246
}
247
247
248
- private class TimedRunnable (
248
+ private class TimedRunnableObsolete (
249
249
private val run : Runnable ,
250
250
private val count : Long = 0 ,
251
251
@JvmField internal val time : Long = 0
252
- ) : Comparable<TimedRunnable >, Runnable by run, ThreadSafeHeapNode {
252
+ ) : Comparable<TimedRunnableObsolete >, Runnable by run, ThreadSafeHeapNode {
253
253
override var heap: ThreadSafeHeap <* >? = null
254
254
override var index: Int = 0
255
255
256
256
override fun run () = run.run ()
257
257
258
- override fun compareTo (other : TimedRunnable ) = if (time == other.time) {
258
+ override fun compareTo (other : TimedRunnableObsolete ) = if (time == other.time) {
259
259
count.compareTo(other.count)
260
260
} else {
261
261
time.compareTo(other.time)
0 commit comments