You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using CoroutineName as coroutine context leads to "java.lang.IllegalArgumentException: Must be used with DispatchedContinuation" on coroutine resume
#133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
funmain(args:Array<String>) = runBlocking(CoroutineName("channels.main")) {
val c = async(CoroutineName("c coroutine")) {
delay(500) // exception will be thrown while resuming42
}
val res = c.await()
}
You will get an exception:
Exception in thread "kotlinx.coroutines.DefaultExecutor" java.lang.IllegalArgumentException: Must be used with DispatchedContinuation
at kotlinx.coroutines.experimental.CancellableContinuationImpl.resumeUndispatched(CancellableContinuation.kt:252)
at kotlinx.coroutines.experimental.EventLoopBase$DelayedResumeTask.run(EventLoop.kt:237)
at kotlinx.coroutines.experimental.EventLoopBase.processNextEvent(EventLoop.kt:129)
at kotlinx.coroutines.experimental.DefaultExecutor.run(DefaultExecutor.kt:54)
at java.lang.Thread.run(Thread.java:748)
Run the following code:
You will get an exception:
The example is taken and reduced from here
1.1.50-master-dev + IDEA 2017.2.5 RC IU-172.4343.5
1.2-Beta-eap-21 + IDEA 2017.2.5 RC IU-172.4343.5 | IDEA 2017.3 EAP IC-173.2463.16
The text was updated successfully, but these errors were encountered: