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 authored and pablobaxter committed Sep 14, 2022
1 parent 8cf0f36 commit 1ebe6b1
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 1ebe6b1

Please sign in to comment.