Skip to content

Commit

Permalink
Modifies CompletableFutureContinuation to implement kotlin debug clas…
Browse files Browse the repository at this point in the history
…s CoroutineStackFrame (#4438) (#4544)
  • Loading branch information
willbuck committed Nov 18, 2020
1 parent 8d44688 commit a9e1aa1
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -20,6 +20,7 @@ import io.micronaut.core.annotation.Internal
import java.util.concurrent.CompletableFuture
import kotlin.coroutines.Continuation
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.jvm.internal.CoroutineStackFrame

/**
* Continuation represented as CompletableFuture
Expand All @@ -29,10 +30,15 @@ import kotlin.coroutines.CoroutineContext
*/
@Internal
@Experimental
class CompletableFutureContinuation(private val continuation: Continuation<Any>) : Continuation<Any> {
class CompletableFutureContinuation(private val continuation: Continuation<Any>) : Continuation<Any>, CoroutineStackFrame {

var completableFuture = CompletableFuture<Any>()

override val callerFrame: CoroutineStackFrame?
get() = continuation as? CoroutineStackFrame

override fun getStackTraceElement(): StackTraceElement? = null

override val context: CoroutineContext
get() = continuation.context

Expand Down

0 comments on commit a9e1aa1

Please sign in to comment.