Fix DeepRecursiveFunction in worker on Native
Add `@SharedImmutable` to `UNDEFINED_RESULT` top-level property.
This commit is contained in:
@@ -7,6 +7,7 @@ package kotlin
|
|||||||
|
|
||||||
import kotlin.coroutines.*
|
import kotlin.coroutines.*
|
||||||
import kotlin.coroutines.intrinsics.*
|
import kotlin.coroutines.intrinsics.*
|
||||||
|
import kotlin.native.concurrent.SharedImmutable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines deep recursive function that keeps its stack on the heap,
|
* Defines deep recursive function that keeps its stack on the heap,
|
||||||
@@ -124,6 +125,7 @@ public sealed class DeepRecursiveScope<T, R> {
|
|||||||
@ExperimentalStdlibApi
|
@ExperimentalStdlibApi
|
||||||
private typealias DeepRecursiveFunctionBlock = suspend DeepRecursiveScope<*, *>.(Any?) -> Any?
|
private typealias DeepRecursiveFunctionBlock = suspend DeepRecursiveScope<*, *>.(Any?) -> Any?
|
||||||
|
|
||||||
|
@SharedImmutable
|
||||||
private val UNDEFINED_RESULT = Result.success(COROUTINE_SUSPENDED)
|
private val UNDEFINED_RESULT = Result.success(COROUTINE_SUSPENDED)
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
|||||||
Reference in New Issue
Block a user