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
My code uses Dispatchers.Default.limitedParallelism(1) on Kotlin/Native with the new memory model enabled. When launching a coroutine on this dispatcher, the following error is thrown:
Uncaught Kotlin exception: kotlin.ClassCastException: kotlinx.coroutines.internal.LimitedDispatcher cannot be cast to kotlinx.atomicfu.locks.SynchronizedObject
at 0 common 0x10a815d5f kfun:kotlin.Throwable#<init>(kotlin.String?){} + 99
at 1 common 0x10a80e89b kfun:kotlin.Exception#<init>(kotlin.String?){} + 95
at 2 common 0x10a80eaef kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 95
at 3 common 0x10a80f927 kfun:kotlin.ClassCastException#<init>(kotlin.String?){} + 95
at 4 common 0x10a84644f ThrowClassCastException + 655
at 5 common 0x10a9f55e3 kfun:kotlinx.coroutines.internal.LimitedDispatcher.tryAllocateWorker#internal + 183
at 6 common 0x10a9f535f kfun:kotlinx.coroutines.internal.LimitedDispatcher#dispatch(kotlin.coroutines.CoroutineContext;kotlinx.coroutines.Runnable){} + 195
at 7 common 0x10a9edfaf kfun:kotlinx.coroutines.internal#resumeCancellableWith__at__kotlin.coroutines.Continuation<0:0>(kotlin.Result<0:0>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?){0§<kotlin.Any?>} + 895
at 8 common 0x10a9ff0e7 kfun:kotlinx.coroutines.intrinsics#startCoroutineCancellable__at__kotlin.coroutines.SuspendFunction1<0:0,0:1>(0:0;kotlin.coroutines.Continuation<0:1>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?){0§<kotlin.Any?>;1§<kotlin.Any?>} + 411
at 9 common 0x10a9ff2af kfun:kotlinx.coroutines.intrinsics#startCoroutineCancellable$default__at__kotlin.coroutines.SuspendFunction1<0:0,0:1>(0:0;kotlin.coroutines.Continuation<0:1>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?;kotlin.Int){0§<kotlin.Any?>;1§<kotlin.Any?>} + 251
at 10 common 0x10a956b8b kfun:kotlinx.coroutines.CoroutineStart#invoke(kotlin.coroutines.SuspendFunction1<0:0,0:1>;0:0;kotlin.coroutines.Continuation<0:1>){0§<kotlin.Any?>;1§<kotlin.Any?>} + 259
at 11 common 0x10a942637 kfun:kotlinx.coroutines.AbstractCoroutine#start(kotlinx.coroutines.CoroutineStart;0:0;kotlin.coroutines.SuspendFunction1<0:0,1:0>){0§<kotlin.Any?>} + 151
at 12 common 0x10a946ce3 kfun:kotlinx.coroutines#launch__at__kotlinx.coroutines.CoroutineScope(kotlin.coroutines.CoroutineContext;kotlinx.coroutines.CoroutineStart;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,kotlin.Unit>){}kotlinx.coroutines.Job + 411
at 13 common 0x10a946f17 kfun:kotlinx.coroutines#launch$default__at__kotlinx.coroutines.CoroutineScope(kotlin.coroutines.CoroutineContext?;kotlinx.coroutines.CoroutineStart?;kotlin.coroutines.SuspendFunction1<kotlinx.coroutines.CoroutineScope,kotlin.Unit>;kotlin.Int){}kotlinx.coroutines.Job + 427
at 14 ...
I guess this function was not implemented for Kotlin/Native yet? Or is this a bug?
My project uses Coroutines version 1.6.0 and Kotlin 1.6.20-RC2.
The text was updated successfully, but these errors were encountered:
My code uses
Dispatchers.Default.limitedParallelism(1)
on Kotlin/Native with the new memory model enabled. When launching a coroutine on this dispatcher, the following error is thrown:I guess this function was not implemented for Kotlin/Native yet? Or is this a bug?
My project uses Coroutines version 1.6.0 and Kotlin 1.6.20-RC2.
The text was updated successfully, but these errors were encountered: