Skip to content

Commit

Permalink
Remove opt-in annotation from internal MainTestDispatcher
Browse files Browse the repository at this point in the history
See #KT-45844
  • Loading branch information
qwwdfsad committed Jun 25, 2021
1 parent e81ce21 commit a327dfb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kotlinx-coroutines-test/src/internal/MainTestDispatcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ internal class TestMainDispatcher(private val mainFactory: MainDispatcherFactory
delegate.dispatch(context, block)
}

@ExperimentalCoroutinesApi
override fun isDispatchNeeded(context: CoroutineContext): Boolean = delegate.isDispatchNeeded(context)

override fun scheduleResumeAfterDelay(timeMillis: Long, continuation: CancellableContinuation<Unit>) {
Expand All @@ -50,11 +49,11 @@ internal class TestMainDispatcher(private val mainFactory: MainDispatcherFactory
return delay.invokeOnTimeout(timeMillis, block, context)
}

public fun setDispatcher(dispatcher: CoroutineDispatcher) {
fun setDispatcher(dispatcher: CoroutineDispatcher) {
_delegate = dispatcher
}

public fun resetDispatcher() {
fun resetDispatcher() {
_delegate = null
}
}
Expand Down

0 comments on commit a327dfb

Please sign in to comment.